[guice] 01/03: Build with maven-debian-helper

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Thu Nov 19 21:30:49 UTC 2015


This is an automated email from the git hooks/post-receive script.

ebourg-guest pushed a commit to branch master
in repository guice.

commit 636a49a4751764cb4bbc96375991145414d52add
Author: Emmanuel Bourg <ebourg at apache.org>
Date:   Thu Nov 19 19:08:52 2015 +0100

    Build with maven-debian-helper
---
 debian/changelog                             |  3 +-
 debian/control                               | 19 +++++-------
 debian/libguice-java-doc.doc-base            |  9 ++++++
 debian/libguice-java-doc.install             |  2 ++
 debian/libguice-java-doc.javadoc             |  1 -
 debian/libguice-java.poms                    | 27 ++++++++++-------
 debian/maven.ignoreRules                     | 12 ++++++++
 debian/maven.properties                      |  5 ++++
 debian/maven.rules                           |  2 ++
 debian/patches/01_fix_build.diff             | 23 ---------------
 debian/patches/02_link_javadocs.diff         | 16 ----------
 debian/patches/03-maven2-compatibility.patch | 14 +++++++++
 debian/patches/series                        |  3 +-
 debian/rules                                 | 44 +---------------------------
 14 files changed, 72 insertions(+), 108 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 70f990f..d815bff 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,8 +2,7 @@ guice (4.0-1) UNRELEASED; urgency=medium
 
   * Team upload.
   * New upstream release
-    - Refreshed the patches
-    - Updated the versions in debian/libguice-java.poms
+  * Build with maven-debian-helper
   * Install the no_aop artifact linked to the main jar in /usr/share/maven-repo
 
  -- Emmanuel Bourg <ebourg at apache.org>  Thu, 19 Nov 2015 10:58:26 +0100
diff --git a/debian/control b/debian/control
index d8b93f2..08f830d 100644
--- a/debian/control
+++ b/debian/control
@@ -3,18 +3,19 @@ Section: java
 Priority: optional
 Maintainer: Debian Java Maintainers <pkg-java-maintainers at lists.alioth.debian.org>
 Uploaders: Miguel Landaeta <miguel at miguel.cc>
-Build-Depends: ant,
-               bnd1.50,
-               debhelper (>= 9),
+Build-Depends: debhelper (>= 9),
                default-jdk,
                default-jdk-doc,
-               javahelper (>= 0.32),
                libaopalliance-java,
                libasm4-java,
                libatinject-jsr330-api-java,
+               libbuild-helper-maven-plugin-java,
                libcglib3-java,
                libguava-java,
-               libjarjar-java,
+               libjarjar-maven-plugin-java,
+               libmaven-bundle-plugin-java,
+               libmaven-javadoc-plugin-java,
+               libmunge-maven-plugin-java,
                libservlet3.1-java,
                libspring-beans-java,
                maven-debian-helper
@@ -25,12 +26,8 @@ Homepage: https://github.com/google/guice
 
 Package: libguice-java
 Architecture: all
-Depends: libaopalliance-java,
-         libasm4-java,
-         libatinject-jsr330-api-java,
-         libcglib3-java,
-         libguava-java,
-         ${misc:Depends}
+Depends: ${misc:Depends}, ${maven:Depends}
+Suggests: ${maven:OptionalDepends}
 Description: lightweight dependency injection framework for Java 5 and above
  Guice provides support for dependency injection using annotations to
  configure Java objects. Dependency injection is a design pattern whose
diff --git a/debian/libguice-java-doc.doc-base b/debian/libguice-java-doc.doc-base
new file mode 100644
index 0000000..8574265
--- /dev/null
+++ b/debian/libguice-java-doc.doc-base
@@ -0,0 +1,9 @@
+Document: libguice-java
+Title: API Javadoc for Guice
+Author: Google Inc
+Abstract: This is the API Javadoc provided for the libguice-java library.
+Section: Programming
+
+Format: HTML
+Index: /usr/share/doc/libguice-java/api/index.html
+Files: /usr/share/doc/libguice-java/api/*
diff --git a/debian/libguice-java-doc.install b/debian/libguice-java-doc.install
new file mode 100644
index 0000000..6dc4ebc
--- /dev/null
+++ b/debian/libguice-java-doc.install
@@ -0,0 +1,2 @@
+
+target/site/apidocs/* usr/share/doc/libguice-java/api
diff --git a/debian/libguice-java-doc.javadoc b/debian/libguice-java-doc.javadoc
deleted file mode 100644
index d2c8d87..0000000
--- a/debian/libguice-java-doc.javadoc
+++ /dev/null
@@ -1 +0,0 @@
-build/docs/javadoc  usr/share/doc/libguice-java/api
diff --git a/debian/libguice-java.poms b/debian/libguice-java.poms
index 698b474..8de1b6e 100644
--- a/debian/libguice-java.poms
+++ b/debian/libguice-java.poms
@@ -26,13 +26,20 @@
 #     Empty by default. [mh_install]
 #
 
-core/pom.xml          --no-parent --has-package-version --java-lib --artifact=build/dist/guice-*.jar
-extensions/pom.xml    --no-parent --has-package-version
-extensions/assistedinject/pom.xml --has-package-version --java-lib --artifact=extensions/assistedinject/build/guice-assistedinject-*.jar
-extensions/servlet/pom.xml        --has-package-version --java-lib --artifact=extensions/servlet/build/guice-servlet-*.jar
-extensions/multibindings/pom.xml  --has-package-version --java-lib --artifact=extensions/multibindings/build/guice-multibindings-*.jar
-extensions/grapher/pom.xml        --has-package-version --java-lib --artifact=extensions/grapher/build/guice-grapher-*.jar
-extensions/jmx/pom.xml            --has-package-version --java-lib --artifact=extensions/jmx/build/guice-jmx-*.jar
-extensions/jndi/pom.xml           --has-package-version --java-lib --artifact=extensions/jndi/build/guice-jndi-*.jar
-extensions/spring/pom.xml         --has-package-version --java-lib --artifact=extensions/spring/build/guice-spring-*.jar
-extensions/throwingproviders/pom.xml --has-package-version --java-lib --artifact=extensions/throwingproviders/build/guice-throwingproviders-*.jar
+pom.xml --no-parent
+core/pom.xml                      --has-package-version --java-lib
+extensions/pom.xml                --has-package-version
+extensions/assistedinject/pom.xml --has-package-version --java-lib
+extensions/servlet/pom.xml        --has-package-version --java-lib
+extensions/multibindings/pom.xml  --has-package-version --java-lib
+extensions/grapher/pom.xml        --has-package-version --java-lib
+extensions/jmx/pom.xml            --has-package-version --java-lib
+extensions/jndi/pom.xml           --has-package-version --java-lib
+extensions/spring/pom.xml         --has-package-version --java-lib
+extensions/throwingproviders/pom.xml --has-package-version --java-lib
+extensions/dagger-adapter/pom.xml --ignore
+extensions/mini/pom.xml --ignore
+extensions/persist/pom.xml --ignore
+extensions/service/pom.xml --ignore
+extensions/struts2/pom.xml --ignore
+extensions/testlib/pom.xml --ignore
diff --git a/debian/maven.ignoreRules b/debian/maven.ignoreRules
new file mode 100644
index 0000000..0039418
--- /dev/null
+++ b/debian/maven.ignoreRules
@@ -0,0 +1,12 @@
+
+com.google.inject guice jar * tests *
+biz.aQute bnd * * * *
+com.google.guava guava-testlib * * * *
+javax.inject javax.inject-tck * * * *
+junit junit * * * *
+org.apache.felix org.apache.felix.framework * * * *
+org.apache.maven.plugins maven-gpg-plugin * * * *
+org.apache.maven.plugins maven-jar-plugin * * * *
+org.apache.maven.plugins maven-remote-resources-plugin * * * *
+org.apache.maven.plugins maven-source-plugin * * * *
+org.codehaus.mojo animal-sniffer-maven-plugin * * * *
diff --git a/debian/maven.properties b/debian/maven.properties
new file mode 100644
index 0000000..e593715
--- /dev/null
+++ b/debian/maven.properties
@@ -0,0 +1,5 @@
+# Include here properties to pass to Maven during the build.
+# For example:
+# maven.test.skip=true
+
+maven.test.skip=true
diff --git a/debian/maven.rules b/debian/maven.rules
index 299b373..796ae4f 100644
--- a/debian/maven.rules
+++ b/debian/maven.rules
@@ -1,3 +1,5 @@
 s/org.sonatype.sisu.inject/cglib/ cglib * s/.*/3.x/ * *
 javax.servlet s/servlet-api/javax.servlet-api/ * s/.*/3.1/ * *
 org.springframework spring-beans * s/.*/3.x/ * *
+cglib cglib * s/.*/3.x/ * *
+org.ow2.asm asm* * s/.*/4.x/ * *
diff --git a/debian/patches/01_fix_build.diff b/debian/patches/01_fix_build.diff
deleted file mode 100644
index 97f9bbd..0000000
--- a/debian/patches/01_fix_build.diff
+++ /dev/null
@@ -1,23 +0,0 @@
-Description: Fix build process to only use jars available in Debian
-Author: Miguel Landaeta <miguel at miguel.cc>
-Bug-Debian: http://bugs.debian.org/579121
-Forwarded: no
-Last-Update: 2011-09-06
-
---- a/build.xml
-+++ b/build.xml
-@@ -18,10 +18,12 @@
-   </path>
- 
- 
--  <target name="jar" depends="jar.withdeps, manifest" description="Build jar.">
-+  <target name="jar" depends="manifest" description="Build jar.">
-+    <mkdir dir="${build.dir}/dist"/>
-     <jar jarfile="${build.dir}/dist/guice-${version}.jar"
-         manifest="${build.dir}/META-INF/MANIFEST.MF">
--      <zipfileset src="${build.dir}/${ant.project.name}-with-deps.jar"/>
-+      <!--<zipfileset src="${build.dir}/${ant.project.name}-with-deps.jar"/>-->
-+      <zipfileset dir="${build.dir}/classes"/>
-     </jar>
-   </target>
- 
diff --git a/debian/patches/02_link_javadocs.diff b/debian/patches/02_link_javadocs.diff
deleted file mode 100644
index ff07c11..0000000
--- a/debian/patches/02_link_javadocs.diff
+++ /dev/null
@@ -1,16 +0,0 @@
-Description: Link javadocs to default-jdk-doc
-Author: Miguel Landaeta <miguel at miguel.cc>
-Forwarded: no
-Last-Update: 2011-09-04
-
---- a/build.xml
-+++ b/build.xml
-@@ -249,7 +249,7 @@
-       <fileset dir="${jmx.src.dir}"/>      
- 
-       <link href="http://aopalliance.sourceforge.net/doc/"/>
--      <link href="http://docs.oracle.com/javase/7/docs/api/"/>
-+      <link href="file:///usr/share/doc/default-jdk-doc/api/"/>
-       <link href="http://atinject.googlecode.com/svn/trunk/javadoc/"/>
-       <link href="http://docs.guava-libraries.googlecode.com/git/javadoc/"/>
-       <link href="https://tomcat.apache.org/tomcat-5.5-doc/servletapi/"/>
diff --git a/debian/patches/03-maven2-compatibility.patch b/debian/patches/03-maven2-compatibility.patch
new file mode 100644
index 0000000..24e4065
--- /dev/null
+++ b/debian/patches/03-maven2-compatibility.patch
@@ -0,0 +1,14 @@
+Description: Remove the prerequisite on Maven 3
+Author: Emmanuel Bourg <ebourg at apache.org>
+Forwarded: not-needed
+--- a/pom.xml
++++ b/pom.xml
+@@ -104,7 +104,7 @@
+   </modules>
+ 
+   <prerequisites>
+-    <maven>3.0</maven>
++    <maven>2.2.1</maven>
+   </prerequisites>
+ 
+   <properties>
diff --git a/debian/patches/series b/debian/patches/series
index 6ac912c..8f2b93c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1 @@
-01_fix_build.diff
-02_link_javadocs.diff
+03-maven2-compatibility.patch
diff --git a/debian/rules b/debian/rules
index 8182aff..71b6e04 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,51 +1,9 @@
 #!/usr/bin/make -f
 
 export JAVA_HOME=/usr/lib/jvm/default-java
-VERSION := \$(shell dpkg-parsechangelog | grep ^Version: | sed -r 's/^.*:\ (.*)-.*$$/\1/')
-
-EXTENSIONS = assistedinject servlet multibindings grapher jmx jndi spring throwingproviders
 
 %:
-	dh $@ --with javahelper
-
-override_dh_auto_build:
-	# install the links to the jars in the lib directory
-	mkdir -p extensions/servlet/lib/build
-	ln -s /usr/share/java/atinject-jsr330-api.jar lib/javax.inject.jar
-	ln -s /usr/share/java/aopalliance.jar         lib/aopalliance.jar
-	ln -s /usr/share/java/asm4.jar                lib/build/asm-3.1.jar
-	ln -s /usr/share/java/bnd-1.50.0.jar          lib/build/bnd-0.0.384.jar
-	ln -s /usr/share/java/cglib3.jar              lib/build/cglib-2.2.1-snapshot.jar
-	ln -s /usr/share/java/guava.jar               lib/guava-16.0.1.jar
-	ln -s /usr/share/java/jarjar.jar              lib/build/jarjar-snapshot.jar
-	ln -s /usr/share/java/servlet-api-3.1.jar     lib/build/servlet.jar
-	ln -s /usr/share/java/spring3-beans.jar       lib/build/spring-beans.jar
-	ln -s /usr/share/java/spring3-core.jar        lib/build/spring-core.jar
-
-	dh_auto_build
-
-	ant -Dversion=$(VERSION) jar javadoc
-	# build the extensions
-	for extension in $(EXTENSIONS) ; do \
-	    ant -f extensions/$$extension/build.xml -Dversion=$(VERSION) jar ; \
-	done
-
-override_dh_auto_install:
-	dh_auto_install
-	mh_install -plibguice-java --set-version=$(VERSION)
-
-override_dh_auto_clean:
-	dh_auto_clean
-	# remove the symbolic links
-	rm -f lib/*.jar lib/build/*.jar
-	# clean extensions build files
-	for extension in $(EXTENSIONS) ; do \
-	    ant -f extensions/$$extension/build.xml clean ; \
-	done
-	mh_clean
-
-override_dh_compress:
-	dh_compress -X.java
+	dh $@ --buildsystem=maven
 
 get-orig-source:
 	cd $(dir $(firstword $(MAKEFILE_LIST)))../ && \

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/guice.git



More information about the pkg-java-commits mailing list