[libaxiom-java] 19/21: Build with maven-debian-helper

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Thu Mar 24 10:34:41 UTC 2016


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

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

commit b3bd48633a68233e1577fa6a32f26acbed6a8833
Author: Emmanuel Bourg <ebourg at apache.org>
Date:   Thu Mar 24 11:24:44 2016 +0100

    Build with maven-debian-helper
---
 debian/ant.properties                              |   2 -
 debian/build.xml                                   | 106 ---------------------
 debian/changelog                                   |   1 +
 debian/control                                     |   6 +-
 debian/libaxiom-java.poms                          |  34 +++++++
 debian/maven.ignoreRules                           |  13 +++
 debian/maven.rules                                 |   9 ++
 .../patches/01-add-parent-pom-relative-path.patch  |  33 +++++++
 debian/patches/02-ignore-modules.patch             |  14 +++
 debian/patches/03-missing-test-dependencies.patch  |  18 ++++
 debian/patches/series                              |   3 +
 debian/rules                                       |  17 +---
 12 files changed, 131 insertions(+), 125 deletions(-)

diff --git a/debian/ant.properties b/debian/ant.properties
deleted file mode 100644
index 82b239a..0000000
--- a/debian/ant.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-ant.build.javac.target=1.4
-ant.build.javac.source=1.4
diff --git a/debian/build.xml b/debian/build.xml
deleted file mode 100644
index f7c3642..0000000
--- a/debian/build.xml
+++ /dev/null
@@ -1,106 +0,0 @@
-<project name="axiom" basedir=".." default="build">
-
-  <property name="modules.dir" value="${basedir}/modules"/>
-  <property name="src.subdir" value="src/main/java"/>
-  <property name="test.subdir" value="src/test/java"/>
-  <property name="rsrc.subdir" value="src/main/resources"/>
-  <property name="build.dir" value="${basedir}/build"/>
-  <property name="target.dir" value="${basedir}/target"/>
-
-  <path id="classpath">
-    <fileset dir="${target.dir}">
-      <include name="**/*.jar"/>
-    </fileset>
-  </path>
-  <path id="classpath.test">
-    <dirset dir="${modules.dir}">
-       <include name="*/${test.subdir}"/>
-    </dirset>
-    <path refid="classpath"/>
-  </path>
-
-  <target name="build">
-    <mkdir dir="${build.dir}"/>
-    <mkdir dir="${target.dir}"/>
-    <antcall target="dojar">
-      <param name="jarname" value="axiom-api"/>
-    </antcall>
-    <antcall target="dojar">
-      <param name="jarname" value="axiom-dom"/>
-    </antcall>
-    <antcall target="dojar">
-      <param name="jarname" value="axiom-impl"/>
-    </antcall>
-  </target>
-
-  <target name="test">
-    <antcall target="compile-module-test">
-      <param name="jarname" value="axiom-api"/>
-    </antcall>
-    <antcall target="compile-module-test">
-      <param name="jarname" value="axiom-dom"/>
-    </antcall>
-    <antcall target="compile-module-test">
-      <param name="jarname" value="axiom-impl"/>
-    </antcall>
-    <antcall target="test-module">
-      <param name="jarname" value="axiom-api"/>
-    </antcall>
-    <antcall target="test-module">
-      <param name="jarname" value="axiom-dom"/>
-    </antcall>
-    <antcall target="test-module">
-      <param name="jarname" value="axiom-impl"/>
-    </antcall>
-  </target>
-
-  <target name="clean" depends="clean-compile-test">
-    <delete dir="${build.dir}"/>
-    <delete dir="${target.dir}"/>
-  </target>
-
-  <target name="dojar">
-    <mkdir dir="${build.dir}/${jarname}"/>
-    <javac srcdir="${modules.dir}/${jarname}/${src.subdir}"
-           destdir="${build.dir}/${jarname}"
-           classpathref="classpath"
-           deprecation="false"
-           failonerror="true"/>
-    <jar destfile="${target.dir}/${jarname}-${artifactVersion}.jar">
-      <fileset dir="${build.dir}/${jarname}">
-        <include name="**/*"/>
-      </fileset>
-      <fileset dir="${modules.dir}/${jarname}/${rsrc.subdir}">
-        <include name="**/*"/>
-      </fileset>
-    </jar>
-  </target>
-
-  <target name="compile-module-test">
-    <javac srcdir="${modules.dir}/${jarname}/${test.subdir}">
-      <classpath>
-        <path refid="classpath.test"/>
-      </classpath>
-    </javac>
-  </target>
-
-  <target name="clean-compile-test">
-    <delete>
-      <fileset dir="${modules.dir}" includes="axiom-*/${test.subdir}/**/*.class" />
-    </delete>
-  </target>
-
-  <target name="test-module">
-    <junit haltonfailure="yes">
-      <classpath refid="classpath.test"/>
-      <formatter type="plain" usefile="false"/>
-      <batchtest>
-        <fileset dir="${modules.dir}/${jarname}/${test.subdir}">
-          <include name="**/*Test.java"/>
-          <include name="**/*TestCase.java"/>
-        </fileset>
-      </batchtest>
-    </junit>
-  </target>
-
-</project>
diff --git a/debian/changelog b/debian/changelog
index 51a4a75..2ea633a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
 libaxiom-java (1.2.8-2) UNRELEASED; urgency=medium
 
   * Team upload.
+  * Build with maven-debian-helper
   * debian/control:
     - Package adopted by the Java Team
     - Standards-Version updated to 3.9.7 (no changes)
diff --git a/debian/control b/debian/control
index 7590e15..e856239 100644
--- a/debian/control
+++ b/debian/control
@@ -5,12 +5,13 @@ Maintainer: Debian Java Maintainers <pkg-java-maintainers at lists.alioth.debian.or
 Uploaders: Chris Grzegorczyk <grze at eucalyptus.com>,
            Graziano Obertelli <graziano at eucalyptus.com>,
            Kyo Lee <kyo.lee at eucalyptus.com>
-Build-Depends: ant-optional, cdbs (>= 0.4.5.3), debhelper (>= 9), default-jdk
+Build-Depends: debhelper (>= 9), default-jdk, maven-debian-helper
 Build-Depends-Indep: junit,
                      libcommons-logging-java,
                      libjaxen-java,
                      liblog4j1.2-java,
                      libmail-java,
+                     libmaven-antrun-plugin-java,
                      libxerces2-java
 Standards-Version: 3.9.7
 Vcs-Git: https://anonscm.debian.org/git/pkg-java/libaxiom-java.git
@@ -19,7 +20,8 @@ Homepage: https://ws.apache.org/axiom/
 
 Package: libaxiom-java
 Architecture: all
-Depends: ${misc:Depends}
+Depends: ${misc:Depends}, ${maven:Depends}
+Suggests: ${maven:OptionalDepends}
 Description: Apache AXIOM - StAX-based XML Infoset compliant object model
  Apache Axiom provides an XML Infoset compliant object model implementation
  which supports on-demand building of the object tree. It supports a novel
diff --git a/debian/libaxiom-java.poms b/debian/libaxiom-java.poms
new file mode 100644
index 0000000..e3220bc
--- /dev/null
+++ b/debian/libaxiom-java.poms
@@ -0,0 +1,34 @@
+# List of POM files for the package
+# Format of this file is:
+# <path to pom file> [option]*
+# where option can be:
+#   --ignore: ignore this POM and its artifact if any
+#   --ignore-pom: don't install the POM. To use on POM files that are created
+#     temporarily for certain artifacts such as Javadoc jars. [mh_install, mh_installpoms]
+#   --no-parent: remove the <parent> tag from the POM
+#   --package=<package>: an alternative package to use when installing this POM
+#      and its artifact
+#   --has-package-version: to indicate that the original version of the POM is the same as the upstream part
+#      of the version for the package.
+#   --keep-elements=<elem1,elem2>: a list of XML elements to keep in the POM
+#      during a clean operation with mh_cleanpom or mh_installpom
+#   --artifact=<path>: path to the build artifact associated with this POM,
+#      it will be installed when using the command mh_install. [mh_install]
+#   --java-lib: install the jar into /usr/share/java to comply with Debian
+#      packaging guidelines
+#   --usj-name=<name>: name to use when installing the library in /usr/share/java
+#   --usj-version=<version>: version to use when installing the library in /usr/share/java
+#   --no-usj-versionless: don't install the versionless link in /usr/share/java
+#   --dest-jar=<path>: the destination for the real jar.
+#     It will be installed with mh_install. [mh_install]
+#   --classifier=<classifier>: Optional, the classifier for the jar. Empty by default.
+#   --site-xml=<location>: Optional, the location for site.xml if it needs to be installed.
+#     Empty by default. [mh_install]
+#
+pom.xml --has-package-version
+modules/axiom-integration/pom.xml --ignore
+modules/axiom-api/pom.xml --has-package-version
+modules/axiom-impl/pom.xml --has-package-version
+modules/axiom-dom/pom.xml --has-package-version
+modules/axiom-c14n/pom.xml --ignore
+modules/axiom-tests/pom.xml --ignore
diff --git a/debian/maven.ignoreRules b/debian/maven.ignoreRules
new file mode 100644
index 0000000..520d04a
--- /dev/null
+++ b/debian/maven.ignoreRules
@@ -0,0 +1,13 @@
+
+${stax.impl.groupid} ${stax.impl.artifact} * * * *
+org.apache.geronimo.specs geronimo-activation_1.1_spec * * * *
+org.apache.geronimo.specs geronimo-stax-api_1.0_spec * * * *
+org.apache.maven.plugins maven-assembly-plugin * * * *
+org.apache.maven.plugins maven-javadoc-plugin * * * *
+org.apache.maven.plugins maven-project-info-reports-plugin * * * *
+org.apache.maven.plugins maven-site-plugin * * * *
+org.apache.maven.plugins maven-source-plugin * * * *
+org.apache.maven.plugins maven-surefire-plugin * * * *
+org.codehaus.mojo jdepend-maven-plugin * * * *
+org.codehaus.woodstox wstx-asl * * * *
+xmlunit xmlunit * * * *
diff --git a/debian/maven.rules b/debian/maven.rules
new file mode 100644
index 0000000..d409921
--- /dev/null
+++ b/debian/maven.rules
@@ -0,0 +1,9 @@
+
+javax.mail javax.mail-api jar s/.*/debian/ * *
+junit junit jar s/3\..*/3.x/ * *
+org.apache.ws.commons.axiom axiom-api jar s/.*/debian/ * *
+org.apache.ws.commons.axiom axiom-dom jar s/.*/debian/ * *
+org.apache.ws.commons.axiom axiom-impl jar s/.*/debian/ * *
+org.apache.ws.commons.axiom axiom pom s/.*/debian/ * *
+commons-logging s/commons-logging-api/commons-logging/ * s/.*/debian/ * *
+s/org.apache.geronimo.specs/com.sun.mail/ s/geronimo-javamail_1.4_spec/javax.mail/ * s/.*/debian/ * *
diff --git a/debian/patches/01-add-parent-pom-relative-path.patch b/debian/patches/01-add-parent-pom-relative-path.patch
new file mode 100644
index 0000000..7fb4b1f
--- /dev/null
+++ b/debian/patches/01-add-parent-pom-relative-path.patch
@@ -0,0 +1,33 @@
+Description: Set the relative path of the poms to make Maven happy
+Author: Emmanuel Bourg <ebourg at apache.org>
+Forwarded: no
+--- a/modules/axiom-api/pom.xml
++++ b/modules/axiom-api/pom.xml
+@@ -23,6 +23,7 @@
+         <groupId>org.apache.ws.commons.axiom</groupId>
+         <artifactId>axiom</artifactId>
+         <version>1.2.8</version>
++        <relativePath>../../pom.xml</relativePath>
+     </parent>
+     <artifactId>axiom-api</artifactId>
+     <name>Axiom API</name>
+--- a/modules/axiom-dom/pom.xml
++++ b/modules/axiom-dom/pom.xml
+@@ -23,6 +23,7 @@
+         <groupId>org.apache.ws.commons.axiom</groupId>
+         <artifactId>axiom</artifactId>
+         <version>1.2.8</version>
++        <relativePath>../../pom.xml</relativePath>
+     </parent>
+     <artifactId>axiom-dom</artifactId>
+     <name>Axiom DOM</name>
+--- a/modules/axiom-impl/pom.xml
++++ b/modules/axiom-impl/pom.xml
+@@ -23,6 +23,7 @@
+         <groupId>org.apache.ws.commons.axiom</groupId>
+         <artifactId>axiom</artifactId>
+         <version>1.2.8</version>
++        <relativePath>../../pom.xml</relativePath>
+     </parent>
+     <artifactId>axiom-impl</artifactId>
+     <name>Axiom Impl</name>
diff --git a/debian/patches/02-ignore-modules.patch b/debian/patches/02-ignore-modules.patch
new file mode 100644
index 0000000..ce84208
--- /dev/null
+++ b/debian/patches/02-ignore-modules.patch
@@ -0,0 +1,14 @@
+Description: Ignore the modules that maven-debian-helper fails to disable (why?)
+Author: Emmanuel Bourg <ebourg at apache.org>
+Forwarded: not-needed
+--- a/pom.xml
++++ b/pom.xml
+@@ -566,8 +566,6 @@
+         <module>modules/axiom-api</module>
+         <module>modules/axiom-impl</module>
+         <module>modules/axiom-dom</module>
+-        <module>modules/axiom-c14n</module>
+-        <module>modules/axiom-tests</module>
+     </modules>
+     <properties>
+         <axiom.version>${pom.version}</axiom.version>
diff --git a/debian/patches/03-missing-test-dependencies.patch b/debian/patches/03-missing-test-dependencies.patch
new file mode 100644
index 0000000..b45c203
--- /dev/null
+++ b/debian/patches/03-missing-test-dependencies.patch
@@ -0,0 +1,18 @@
+Description: Add the missing test dependency on Xerces for axiom-dom
+Author: Emmanuel Bourg <ebourg at apache.org>
+Forwarded: not-needed
+--- a/modules/axiom-dom/pom.xml
++++ b/modules/axiom-dom/pom.xml
+@@ -66,6 +66,12 @@
+             <version>${version}</version>
+             <scope>test</scope>
+         </dependency>
++        <dependency>
++            <groupId>xerces</groupId>
++            <artifactId>xercesImpl</artifactId>
++            <version>2.11.0</version>
++            <scope>test</scope>
++        </dependency>
+     </dependencies>
+     <build>
+         <resources>
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..95b54d4
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,3 @@
+01-add-parent-pom-relative-path.patch
+02-ignore-modules.patch
+03-missing-test-dependencies.patch
diff --git a/debian/rules b/debian/rules
index 1f0c5e0..aba914b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,20 +1,7 @@
 #!/usr/bin/make -f
 
-include /usr/share/cdbs/1/rules/debhelper.mk
-include /usr/share/cdbs/1/class/ant.mk
-
-JAVA_HOME            := /usr/lib/jvm/default-java
-DEB_ANT_CHECK_TARGET := test
-DEB_ANT_BUILDFILE    := ./debian/build.xml
-DEB_ANT_ARGS         := -DartifactVersion=$(DEB_UPSTREAM_VERSION)
-DEB_JARS             := commons-logging-api jaxen log4j-1.2 xercesImpl \
-                        javax.mail ant-junit junit
-
-binary-post-install/libaxiom-java::
-	for jar in api dom impl; do \
-		dh_install -plibaxiom-java target/axiom-$$jar-$(DEB_UPSTREAM_VERSION).jar usr/share/java; \
-		dh_link -plibaxiom-java usr/share/java/axiom-$$jar-$(DEB_UPSTREAM_VERSION).jar usr/share/java/axiom-$$jar.jar; \
-	done
+%:
+	dh $@ --buildsystem=maven
 
 get-orig-source:
 	uscan --download-current-version --force-download --no-symlink

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



More information about the pkg-java-commits mailing list