diff --git a/maven-eclipse-plugin-2.9-source-release.zip b/maven-eclipse-plugin-2.9-source-release.zip new file mode 100644 index 0000000..abedea6 Binary files /dev/null and b/maven-eclipse-plugin-2.9-source-release.zip differ diff --git a/maven-eclipse-plugin-compat.patch b/maven-eclipse-plugin-compat.patch new file mode 100644 index 0000000..3acbb26 --- /dev/null +++ b/maven-eclipse-plugin-compat.patch @@ -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 @@ + + + org.apache.maven ++ maven-compat ++ ${mavenVersion} ++ ++ ++ org.apache.maven + maven-project + ${mavenVersion} + diff --git a/maven-eclipse-plugin-exception.patch b/maven-eclipse-plugin-exception.patch new file mode 100644 index 0000000..a0db013 --- /dev/null +++ b/maven-eclipse-plugin-exception.patch @@ -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(); diff --git a/maven-eclipse-plugin-ioexception.patch b/maven-eclipse-plugin-ioexception.patch new file mode 100644 index 0000000..c56b62c --- /dev/null +++ b/maven-eclipse-plugin-ioexception.patch @@ -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 ); +- } + } + } + diff --git a/maven-eclipse-plugin.spec b/maven-eclipse-plugin.spec new file mode 100644 index 0000000..b9c15c7 --- /dev/null +++ b/maven-eclipse-plugin.spec @@ -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']]" "provided" +%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 - 2.9-1 +- Package init diff --git a/maven-eclipse-plugin.yaml b/maven-eclipse-plugin.yaml new file mode 100644 index 0000000..00bbaf0 --- /dev/null +++ b/maven-eclipse-plugin.yaml @@ -0,0 +1,4 @@ +version_control: NA +src_repo: NA +tag_prefix: NA +seperator: NA