[eclipse-m2e-core] Install with XMvn

Mikolaj Izdebski mizdebsk at fedoraproject.org
Thu Sep 11 10:33:43 UTC 2014


commit 1253004a9a854080be544975dbb5be2584edf31c
Author: Mikolaj Izdebski <mizdebsk at redhat.com>
Date:   Wed Sep 10 07:01:06 2014 +0200

    Install with XMvn

 eclipse-m2e-core-disable-unneeded-features.patch |   22 ---------
 eclipse-m2e-core.spec                            |   53 ++++++---------------
 2 files changed, 15 insertions(+), 60 deletions(-)
---
diff --git a/eclipse-m2e-core.spec b/eclipse-m2e-core.spec
index 2cce7f6..143778f 100644
--- a/eclipse-m2e-core.spec
+++ b/eclipse-m2e-core.spec
@@ -53,9 +53,6 @@ Patch14:        %{name}-LifecycleMappingFactory.patch
 # API changes in lucene 4
 Patch16:        %{name}-lucene-4.patch
 
-# Exclude features we don't build from p2 repo.
-Patch17:        %{name}-disable-unneeded-features.patch
-
 BuildArch:      noarch
 
 
@@ -69,7 +66,6 @@ BuildRequires:  mvn(org.codehaus.mojo:build-helper-maven-plugin)
 BuildRequires:  mvn(org.eclipse.tycho:target-platform-configuration)
 BuildRequires:  mvn(org.eclipse.tycho:tycho-maven-plugin)
 BuildRequires:  mvn(org.eclipse.tycho:tycho-source-plugin)
-BuildRequires:  mvn(org.fedoraproject:feclipse-maven-plugin)
 BuildRequires:  mvn(org.sonatype.forge:forge-parent:pom:)
 
 # Additional Maven build-requires for m2e-maven-runtime.  They cannot
@@ -271,29 +267,13 @@ for mod in org.eclipse.m2e.tests.common \
            org.eclipse.m2e.logback.appender \
            org.eclipse.m2e.logback.configuration \
            org.eclipse.m2e.logback.feature \
-           org.eclipse.m2e.sdk.feature
+           org.eclipse.m2e.sdk.feature \
+           org.eclipse.m2e.site
 do
   %pom_disable_module $mod
   rm -rf $mod
 done
 
-# Install p2 repo using feclipse-maven-plugin
-# See: https://fedoraproject.org/wiki/Feclipse-maven-installer
-%pom_add_plugin org.fedoraproject:feclipse-maven-plugin:0.0.4 org.eclipse.m2e.site "
-  <configuration>
-    <sourceRepo>\${project.build.directory}/repository</sourceRepo>
-    <targetLocation>\${session.executionRootDirectory}/eclipse</targetLocation>
-  </configuration>
-  <executions>
-    <execution>
-      <id>install</id>
-      <phase>package</phase>
-      <goals>
-        <goal>install</goal>
-      </goals>
-    </execution>
-  </executions>"
-
 # aether-connector-okhttp has changed groupId
 #pom_remove_dep io.tesla.aether:aether-connector-okhttp m2e-maven-runtime/org.eclipse.m2e.maven.runtime
 #pom_add_dep io.takari.aether:aether-connector-okhttp m2e-maven-runtime/org.eclipse.m2e.maven.runtime
@@ -318,34 +298,28 @@ sed -i -e "s/aether-connector-wagon/aether-transport-wagon/" m2e-maven-runtime/o
 # http://wiki.eclipse.org/M2E_Development_Environment#Building_m2e_on_command_line
 repo=localrepo
 xmvn -B -o install -f m2e-maven-runtime/pom.xml -Dmaven.repo.local=${repo}
-%mvn_build -i -- -Dmaven.repo.local=${repo}
+%mvn_build -- -Dmaven.repo.local=${repo}
 
 %install
-%mvn_install
-
-# Install plugins and features
-install -d -m 755 %{buildroot}%{install_loc}
-cp -a eclipse %{buildroot}%{install_loc}
 
-# Install extra plugin dependencies
-for bsn in com.google.guava \
-           org.apache.maven.archetype.catalog \
-           org.apache.maven.archetype.descriptor \
-           slf4j.api
+%mvn_artifact m2e-maven-runtime/$mod/pom.xml
+for mod in org.eclipse.m2e.archetype.common \
+           org.eclipse.m2e.maven.indexer \
+           org.eclipse.m2e.maven.runtime \
+           org.eclipse.m2e.maven.runtime.slf4j.simple
 do
-  bundle=`basename .m2/p2/repo/plugins/${bsn}_*.jar`
-  cp .m2/p2/repo/plugins/$bundle %{buildroot}%{install_loc}/eclipse/plugins/
-  extra="$extra %{buildroot}%{install_loc}/eclipse/plugins/$bundle"
+    %mvn_artifact -Dtype=eclipse-plugin m2e-maven-runtime/$mod/pom.xml m2e-maven-runtime/$mod/target/$mod-%{version}-SNAPSHOT.jar
 done
 
+%mvn_install
+
 # Replace bundled JARs with symlinks to system JARs using XMvn Subst.  This way
 # there is no need to manually synchronize JAR lists between Maven and M2E when
 # some Maven dependency changes.  All that needs to be done is rebuilding M2E.
 xmvn-subst -s `find %{buildroot}%{install_loc} -name jars` $extra
 
 
-%files
-%{install_loc}
+%files -f .mfiles
 %doc org.eclipse.m2e.core/about.html
 %doc epl-v10.html LICENSE-2.0.txt
 
@@ -354,6 +328,9 @@ xmvn-subst -s `find %{buildroot}%{install_loc} -name jars` $extra
 
 
 %changelog
+* Wed Sep 10 2014 Mikolaj Izdebski <mizdebsk at redhat.com> - 1.5.0-14
+- Install with XMvn
+
 * Sun Aug 31 2014 Mikolaj Izdebski <mizdebsk at redhat.com> - 1.5.0-14
 - Rebuild for Maven 3.2.3
 


More information about the scm-commits mailing list