!1 Package init

Merge pull request !1 from jeff200902/master
This commit is contained in:
openeuler-ci-bot 2020-08-31 10:03:05 +08:00 committed by Gitee
commit e309ae2f02
6 changed files with 127 additions and 0 deletions

Binary file not shown.

View File

@ -0,0 +1,16 @@
diff --git a/pom.xml b/pom.xml
index 3501c0d..0c31661 100644
--- a/pom.xml
+++ b/pom.xml
@@ -34,6 +34,11 @@
<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
+ <artifactId>maven-compat</artifactId>
+ <version>${mavenVersion}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
<version>${mavenVersion}</version>
</dependency>

View File

@ -0,0 +1,36 @@
diff --git a/src/main/java/org/apache/maven/plugin/ide/AbstractIdeSupportMojo.java b/src/main/java/org/apache/maven/plugin/ide/AbstractIdeSupportMojo.java
index fcab66c..87782cb 100644
--- a/src/main/java/org/apache/maven/plugin/ide/AbstractIdeSupportMojo.java
+++ b/src/main/java/org/apache/maven/plugin/ide/AbstractIdeSupportMojo.java
@@ -545,9 +545,6 @@ public abstract class AbstractIdeSupportMojo
ArtifactResolutionResult artifactResolutionResult = null;
- try
- {
-
List listeners = new ArrayList();
if ( logger.isDebugEnabled() )
@@ -561,21 +558,6 @@ public abstract class AbstractIdeSupportMojo
artifactCollector.collect( getProjectArtifacts(), project.getArtifact(), managedVersions,
localRepo, project.getRemoteArtifactRepositories(),
getArtifactMetadataSource(), null, listeners );
- }
- catch ( ArtifactResolutionException e )
- {
- getLog().debug( e.getMessage(), e );
- getLog().error(
- Messages.getString( "AbstractIdeSupportMojo.artifactresolution", new Object[] { //$NON-NLS-1$
- e.getGroupId(), e.getArtifactId(), e.getVersion(),
- e.getMessage() } ) );
-
- // if we are here artifactResolutionResult is null, create a project without dependencies but
- // don't fail
- // (this could be a reactor projects, we don't want to fail everything)
- // Causes MECLIPSE-185. Not sure if it should be handled this way??
- return new IdeDependency[0];
- }
// keep track of added reactor projects in order to avoid duplicates
Set emittedReactorProjectId = new HashSet();

View File

@ -0,0 +1,15 @@
diff --git a/src/main/java/org/apache/maven/plugin/eclipse/InstallPluginsMojo.java b/src/main/java/org/apache/maven/plugin/eclipse/InstallPluginsMojo.java
index d2a543a..4a15a45 100644
--- a/src/main/java/org/apache/maven/plugin/eclipse/InstallPluginsMojo.java
+++ b/src/main/java/org/apache/maven/plugin/eclipse/InstallPluginsMojo.java
@@ -407,10 +407,6 @@ public class InstallPluginsMojo
{
throw new MojoExecutionException( "Could not extract: " + artifactFile, e );
}
- catch ( IOException e )
- {
- throw new MojoExecutionException( "Could not extract: " + artifactFile, e );
- }
}
}

56
maven-eclipse-plugin.spec Normal file
View File

@ -0,0 +1,56 @@
%global __requires_exclude mvn\\(org\\.eclipse\\.core:resources\\)
Name: maven-eclipse-plugin
Version: 2.9
Release: 1
Summary: Maven Eclipse Plugin
License: ASL 2.0
URL: http://maven.apache.org/plugins/maven-eclipse-plugin/
Source0: https://repo1.maven.org/maven2/org/apache/maven/plugins/%{name}/%{version}/%{name}-%{version}-source-release.zip
Patch0: %{name}-compat.patch
Patch1: %{name}-exception.patch
Patch2: %{name}-ioexception.patch
BuildArch: noarch
BuildRequires: maven-local maven-enforcer-plugin maven-plugins-pom maven-test-tools
BuildRequires: maven-plugin-testing-tools maven-osgi apache-commons-io xmlunit
BuildRequires: eclipse-platform plexus-resources plexus-interactivity-jline bsf jaxen jdom
BuildRequires: dom4j xom saxpath
%description
The Eclipse Plugin is used to generate Eclipse IDE files (.project, .classpath
and the .settings folder) from a POM.
%package javadoc
Summary: Javadoc for %{name}
%description javadoc
API documentation for %{name}.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
sed -i -e "s|3.3.0-v20070604|3.7.100.v20110510-0712|g" pom.xml
sed -i 's/aQute\.lib\.osgi/aQute.bnd.osgi/g' src/main/java/org/apache/maven/plugin/eclipse/EclipseToMavenMojo.java
%pom_remove_dep easymock:
%build
export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
CORE_FAKE_VERSION="3.7.100.v20110510-0712"
CORE_PLUGIN_DIR=$MAVEN_REPO_LOCAL/org/eclipse/core/resources/$CORE_FAKE_VERSION
mkdir -p $CORE_PLUGIN_DIR
plugin_file=`ls /usr/lib{,64}/eclipse/plugins/org.eclipse.core.resources_*jar || :`
ln -s "$plugin_file" $CORE_PLUGIN_DIR/resources-$CORE_FAKE_VERSION.jar
%pom_xpath_inject "pom:dependencies/pom:dependency[pom:groupId[text()='org.eclipse.core']]" "<scope>provided</scope>"
%mvn_build -- -Dmaven.test.skip=true -Dmaven.repo.local=$MAVEN_REPO_LOCAL
%install
%mvn_install
%files -f .mfiles
%doc LICENSE NOTICE DEPENDENCIES README-testing.txt
%files javadoc -f .mfiles-javadoc
%doc LICENSE NOTICE
%changelog
* Sat Aug 22 2020 Jeffery.Gao <gaojianxing@huawei.com> - 2.9-1
- Package init

View File

@ -0,0 +1,4 @@
version_control: NA
src_repo: NA
tag_prefix: NA
seperator: NA