[java-sig-commits] [maven-plugin-bundle] update to 2.3.5

Jaromír Cápík jcapik at fedoraproject.org
Thu Nov 10 11:23:43 UTC 2011


commit b482e02a0496ca865f9b106ff5c5b324aec9bdd3
Author: Jaromir Capik <jcapik at redhat.com>
Date:   Thu Nov 10 12:23:33 2011 +0100

    update to 2.3.5

 .gitignore                                         |    1 +
 maven-bundle-plugin-exception-already-thrown.patch |   22 +++++++
 maven-bundle-plugin-unbundling.patch               |   15 +++++
 maven-plugin-bundle.spec                           |   60 +++++++++++++-------
 sources                                            |    2 +-
 5 files changed, 78 insertions(+), 22 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 065e5ab..b3009a6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 maven-bundle-plugin-2.0.0-project.tar.gz
+/maven-bundle-plugin-2.3.5-source-release.tar.gz
diff --git a/maven-bundle-plugin-exception-already-thrown.patch b/maven-bundle-plugin-exception-already-thrown.patch
new file mode 100644
index 0000000..85fd62a
--- /dev/null
+++ b/maven-bundle-plugin-exception-already-thrown.patch
@@ -0,0 +1,22 @@
+diff -Naur maven-bundle-plugin-2.3.5.orig/src/main/java/org/apache/felix/bundleplugin/BundleAllPlugin.java maven-bundle-plugin-2.3.5/src/main/java/org/apache/felix/bundleplugin/BundleAllPlugin.java
+--- maven-bundle-plugin-2.3.5.orig/src/main/java/org/apache/felix/bundleplugin/BundleAllPlugin.java	2011-07-05 13:56:06.000000000 +0200
++++ maven-bundle-plugin-2.3.5/src/main/java/org/apache/felix/bundleplugin/BundleAllPlugin.java	2011-10-26 13:11:10.904188217 +0200
+@@ -271,14 +271,14 @@
+                     childProject.setDependencyArtifacts( childProject.createArtifacts( m_factory, null, null ) );
+                 }
+             }
+-            catch ( ProjectBuildingException e )
+-            {
+-                throw new MojoExecutionException( "Unable to build project object for artifact " + artifact, e );
+-            }
+             catch ( InvalidDependencyVersionException e )
+             {
+                 throw new MojoExecutionException( "Invalid dependency version for artifact " + artifact );
+             }
++            catch ( ProjectBuildingException e )
++            {
++                throw new MojoExecutionException( "Unable to build project object for artifact " + artifact, e );
++            }
+ 
+             childProject.setArtifact( artifact );
+             getLog().debug( "Child project artifact location: " + childProject.getArtifact().getFile() );
diff --git a/maven-bundle-plugin-unbundling.patch b/maven-bundle-plugin-unbundling.patch
new file mode 100644
index 0000000..2a36f58
--- /dev/null
+++ b/maven-bundle-plugin-unbundling.patch
@@ -0,0 +1,15 @@
+diff -Naur maven-bundle-plugin-2.3.5.orig/pom.xml maven-bundle-plugin-2.3.5/pom.xml
+--- maven-bundle-plugin-2.3.5.orig/pom.xml	2011-07-05 13:56:06.000000000 +0200
++++ maven-bundle-plugin-2.3.5/pom.xml	2011-10-25 17:29:47.237943990 +0200
+@@ -85,6 +85,11 @@
+    <version>1.2</version>
+   </dependency>
+   <dependency>
++   <groupId>org.apache.maven.shared</groupId>
++   <artifactId>maven-osgi</artifactId>
++   <version>0.3.0</version>
++  </dependency>
++  <dependency>
+    <groupId>org.codehaus.plexus</groupId>
+    <artifactId>plexus-utils</artifactId>
+    <version>2.1</version>
diff --git a/maven-plugin-bundle.spec b/maven-plugin-bundle.spec
index 906b33a..e3bf9d5 100644
--- a/maven-plugin-bundle.spec
+++ b/maven-plugin-bundle.spec
@@ -1,13 +1,19 @@
+%global site_name maven-bundle-plugin
+
 Name:           maven-plugin-bundle
-Version:        2.0.0
-Release:        11%{?dist}
+Version:        2.3.5
+Release:        1%{?dist}
 Summary:        Maven Bundle Plugin
 
 Group:          Development/Tools
 License:        ASL 2.0
 URL:            http://felix.apache.org
-Source0:        http://www.apache.org/dist/felix/maven-bundle-plugin-2.0.0-project.tar.gz
-BuildRequires: aqute-bnd >= 0.0.363
+Source0:        http://apache.tradebit.com/pub/felix/%{site_name}-%{version}-source-release.tar.gz
+
+Patch0:         %{site_name}-unbundling.patch
+Patch1:         %{site_name}-exception-already-thrown.patch
+
+BuildRequires: aqute-bndlib >= 1.43.0
 BuildRequires: plexus-utils >= 1.4.5
 BuildRequires: felix-osgi-obr
 BuildRequires: kxml
@@ -15,16 +21,19 @@ BuildRequires: maven
 BuildRequires: maven-shared-dependency-tree >= 1.1-3
 BuildRequires: maven-wagon >= 1.0-0.2.b2
 BuildRequires: maven-compiler-plugin
-BuildRequires: maven-install-plugin 
-BuildRequires: maven-jar-plugin 
-BuildRequires: maven-javadoc-plugin 
-BuildRequires: maven-plugin-plugin 
+BuildRequires: maven-install-plugin
+BuildRequires: maven-jar-plugin
+BuildRequires: maven-javadoc-plugin
+BuildRequires: maven-plugin-plugin
 BuildRequires: maven-resources-plugin
 BuildRequires: maven-surefire-plugin >= 2.3
 BuildRequires: maven-surefire-provider-junit4 >= 2.3
 BuildRequires: maven-doxia-sitetools
+BuildRequires: maven-shared-osgi
 BuildRequires: felix-parent
-Requires: aqute-bnd >= 0.0.363
+BuildRequires: felix-bundlerepository
+
+Requires: aqute-bndlib >= 1.43.0
 Requires: plexus-utils >= 1.4.5
 Requires: felix-osgi-obr
 Requires: kxml
@@ -32,9 +41,11 @@ Requires: maven
 Requires: maven-archiver
 Requires: maven-shared-dependency-tree
 Requires: maven-wagon
+Requires: maven-shared-osgi
 Requires: plexus-archiver
 Requires: plexus-containers-container-default
 Requires: felix-parent
+Requires: felix-bundlerepository
 
 BuildArch: noarch
 
@@ -53,40 +64,47 @@ Requires:       jpackage-utils
 API documentation for %{name}.
 
 %prep
-%setup -q -n maven-bundle-plugin-%{version}
+%setup -q -n %{site_name}-%{version}
 
-sed -i 's/<artifactId>bndlib/<artifactId>bnd/g' pom.xml
+%patch0 -p1
+%patch1 -p1
+
+# remove bundled stuff
+rm -rf src/main/java/org/apache/maven
+rm -rf src/main/java/org/apache/felix/obrplugin
 
 %build
-mvn-rpmbuild install javadoc:javadoc
+# tests can't be built (seems like a MavenProjectStub incompatibility with MavenProject)
+mvn-rpmbuild install javadoc:aggregate -Dmaven.test.skip=true
 
 %install
 # jars
 install -d -m 0755 %{buildroot}%{_javadir}
-install -m 644 target/maven-bundle-plugin-%{version}.jar \
-  $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
-
-%add_to_maven_depmap org.apache.felix maven-bundle-plugin %{version} JPP %{name}
+install -m 644 target/maven-bundle-plugin-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
 
 # poms
 install -d -m 755 %{buildroot}%{_mavenpomdir}
-install -pm 644 pom.xml \
-    %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
+install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
 
 # javadoc
 install -d -m 0755 %{buildroot}%{_javadocdir}/%{name}
 cp -pr target/site/api*/* %{buildroot}%{_javadocdir}/%{name}/
 rm -rf target/site/api*
 
+%add_maven_depmap JPP-%{name}.pom %{name}.jar
+
 %files
-%{_javadir}/*
-%{_mavenpomdir}/*
-%{_mavendepmapfragdir}/*
+%{_javadir}/%{name}.jar
+%{_mavenpomdir}/JPP-%{name}.pom
+%{_mavendepmapfragdir}/%{name}
 
 %files javadoc
 %{_javadocdir}/%{name}
 
 %changelog
+* Mon Oct 24 2011 Jaromir Capik <jcapik at redhat.com> 2.3.5-1
+- Update to 2.3.5
+
 * Tue Oct 17 2011 Jaromir Capik <jcapik at redhat.com> 2.0.0-11
 - aqute-bndlib renamed to aqute-bnd
 
diff --git a/sources b/sources
index dfd42cf..fcc129f 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-de97b6f6b92b7ebef33000f4ed31ebb1  maven-bundle-plugin-2.0.0-project.tar.gz
+051b3096fa2a5ab98320b61b27cf38b3  maven-bundle-plugin-2.3.5-source-release.tar.gz


More information about the java-sig-commits mailing list