[java-sig-commits] [maven-eclipse-plugin] Build with maven 3.x.

Alexander Kurtakov akurtakov at fedoraproject.org
Fri Jun 17 02:47:00 UTC 2011


commit cdf60da7cabd65f341c609d19bd8df9df132f143
Author: Alexander Kurtakov <akurtakov at gmail.com>
Date:   Fri Jun 17 05:46:27 2011 +0300

    Build with maven 3.x.

 kill-bsh.patch                  |   45 +++++++++++++++++++++++++++++++++++++++
 maven-eclipse-plugin-depmap.xml |   25 ---------------------
 maven-eclipse-plugin.spec       |   40 +++++++++++++---------------------
 3 files changed, 60 insertions(+), 50 deletions(-)
---
diff --git a/kill-bsh.patch b/kill-bsh.patch
new file mode 100644
index 0000000..e7db682
--- /dev/null
+++ b/kill-bsh.patch
@@ -0,0 +1,45 @@
+--- pom.xml.sav	2011-06-17 05:34:44.000000000 +0300
++++ pom.xml	2011-06-17 05:41:02.591296595 +0300
+@@ -220,42 +220,6 @@ under the License.
+         <version>2.4.3</version>
+       </plugin>
+       <plugin>
+-        <groupId>org.apache.maven.plugins</groupId>
+-        <artifactId>maven-antrun-plugin</artifactId>
+-        <executions>
+-          <execution>
+-            <id>verify-integration-tests-checks</id>
+-            <phase>post-integration-test</phase>
+-            <configuration>
+-              <tasks>
+-                <property name="script" location="verify-integration-tests-checks.bsh" />
+-                <script language="beanshell" src="${script}" />
+-              </tasks>
+-            </configuration>
+-            <goals>
+-              <goal>run</goal>
+-            </goals>
+-          </execution>
+-        </executions>
+-        <dependencies>
+-          <dependency>
+-            <groupId>org.apache.ant</groupId>
+-            <artifactId>ant-nodeps</artifactId>
+-            <version>1.7.1</version>
+-          </dependency>
+-          <dependency>
+-            <groupId>org.apache.ant</groupId>
+-            <artifactId>ant-apache-bsf</artifactId>
+-            <version>1.7.1</version>
+-          </dependency>
+-          <dependency>
+-            <groupId>org.beanshell</groupId>
+-            <artifactId>bsh</artifactId>
+-            <version>2.0b4</version>
+-          </dependency>
+-        </dependencies>
+-      </plugin>
+-      <plugin>
+         <artifactId>maven-enforcer-plugin</artifactId>
+         <executions>
+           <execution>
diff --git a/maven-eclipse-plugin-depmap.xml b/maven-eclipse-plugin-depmap.xml
index 79d5386..9c9fde5 100644
--- a/maven-eclipse-plugin-depmap.xml
+++ b/maven-eclipse-plugin-depmap.xml
@@ -3,18 +3,6 @@
         This will be fixed with time by the Third-Party project. -->
    <dependency>
       <maven>
-         <groupId>org.codehaus.plexus</groupId>
-         <artifactId>plexus-resources</artifactId>
-         <version>1.0-alpha-7</version>
-      </maven>
-      <jpp>
-         <groupId>JPP/plexus</groupId>
-         <artifactId>resources</artifactId>
-         <version>1.0</version>
-      </jpp>
-   </dependency>
-   <dependency>
-      <maven>
          <groupId>bsf</groupId>
          <artifactId>bsf</artifactId>
          <version>2.4.0</version>
@@ -25,17 +13,4 @@
          <version>2.4.0</version>
       </jpp>
    </dependency>
-   <!-- <dependency>
-      <maven>
-         <groupId>org.eclipse.core</groupId>
-         <artifactId>resources</artifactId>
-         <version>3.3.0-v20070604</version>
-      </maven>
-      <jpp>
-         <groupId>JPP/org.eclipse.core</groupId>
-         <artifactId>resources</artifactId>
-         <version>3.5.2</version>
-      </jpp>
-   </dependency>
-   -->
 </dependencies>
diff --git a/maven-eclipse-plugin.spec b/maven-eclipse-plugin.spec
index bdfc9d0..f7b33b7 100644
--- a/maven-eclipse-plugin.spec
+++ b/maven-eclipse-plugin.spec
@@ -1,6 +1,6 @@
 Name:           maven-eclipse-plugin
 Version:        2.8
-Release:        4%{?dist}
+Release:        5%{?dist}
 Summary:        Maven Eclipse Plugin
 
 Group:          Development/Libraries
@@ -24,8 +24,7 @@ Patch0:        %{name}-pom.patch
 # In a7, the same API throw an extra IOException, the patch is tested to be 
 # safe. But it should be removed when a7 is ready. 
 Patch1:        %{name}-install-plugin-mojo.patch
-
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Patch2:        kill-bsh.patch
 
 BuildArch: noarch
 
@@ -34,7 +33,7 @@ BuildRequires: jpackage-utils
 BuildRequires: java-devel >= 1:1.6.0
 
 # Maven and its dependencies
-BuildRequires: maven2
+BuildRequires: maven
 BuildRequires: maven-plugin-plugin
 BuildRequires: maven-resources-plugin
 BuildRequires: maven-compiler-plugin
@@ -45,7 +44,7 @@ BuildRequires: maven-doxia
 BuildRequires: maven-doxia-tools
 BuildRequires: maven-doxia-sitetools
 BuildRequires: maven-surefire-provider-junit
-BuildRequires: maven-surefire-maven-plugin
+BuildRequires: maven-surefire-plugin
 BuildRequires: maven-plugin-cobertura
 BuildRequires: maven-archiver
 BuildRequires: maven-shared-osgi
@@ -68,7 +67,7 @@ BuildRequires: saxpath
 
 
 Requires: java
-Requires: maven2
+Requires: maven
 Requires: apache-commons-io
 Requires: plexus-resources
 Requires: jpackage-utils
@@ -95,9 +94,9 @@ API documentation for %{name}.
 
 %prep
 %setup -q -n %{name}
-
-%patch0
 %patch1
+sed -i -e "s|3.3.0-v20070604|3.7.100.v20110510-0712|g" pom.xml
+%patch2
 
 %build
 export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
@@ -107,7 +106,7 @@ export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
 cp %{SOURCE1} %{name}-depmap.xml
 export MAVEN_DEPMAP=$(pwd)/%{name}-depmap.xml
 
-CORE_FAKE_VERSION="3.5.2-v201004121342"
+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
@@ -115,17 +114,13 @@ plugin_file=`ls %{_libdir}/eclipse/plugins/org.eclipse.core.resources_*jar`
 
 ln -s "$plugin_file" $CORE_PLUGIN_DIR/resources-$CORE_FAKE_VERSION.jar
 
-mvn-jpp \
-        -e \
+mvn-rpmbuild -e \
         -Dmaven.test.skip=true \
-        -Dmaven2.jpp.mode=true \
-        -Dmaven2.jpp.depmap.file=${MAVEN_DEPMAP} \
+        -Dmaven.local.depmap.file=${MAVEN_DEPMAP} \
         -Dmaven.repo.local=$MAVEN_REPO_LOCAL \
         install javadoc:javadoc
 
 %install
-rm -rf %{buildroot}
-
 # jars
 install -d -m 0755 %{buildroot}%{_javadir}
 install -m 644 target/%{name}-%{version}.jar   %{buildroot}%{_javadir}/%{name}-%{version}.jar
@@ -141,10 +136,8 @@ install -pm 644 pom.xml \
     %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
 
 # javadoc
-install -d -m 0755 %{buildroot}%{_javadocdir}/%{name}-%{version}
-cp -pr target/site/api*/* %{buildroot}%{_javadocdir}/%{name}-%{version}/
-ln -s %{name}-%{version} %{buildroot}%{_javadocdir}/%{name}
-rm -rf target/site/api*
+install -d -m 0755 %{buildroot}%{_javadocdir}/%{name}
+cp -pr target/site/api*/* %{buildroot}%{_javadocdir}/%{name}/
 
 %post
 %update_maven_depmap
@@ -152,21 +145,18 @@ rm -rf target/site/api*
 %postun
 %update_maven_depmap
 
-%clean
-rm -rf %{buildroot}
-
 %files
-%defattr(-,root,root,-)
 %{_javadir}/*
 %{_mavenpomdir}/*
 %{_mavendepmapfragdir}/*
 
 %files javadoc
-%defattr(-,root,root,-)
-%{_javadocdir}/%{name}-%{version}
 %{_javadocdir}/%{name}
 
 %changelog
+* Fri Jun 17 2011 Alexander Kurtakov <akurtako at redhat.com> 2.8-5
+- Build with maven 3.x.
+
 * Tue Feb 08 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.8-4
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
 


More information about the java-sig-commits mailing list