[modello] 02/04: Build with maven-debian-helper

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Tue Feb 16 11:27:55 GMT 2016


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

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

commit 8c5f18e156d28220ab1660017e47b069044919dd
Author: Emmanuel Bourg <ebourg at apache.org>
Date:   Tue Feb 16 09:56:08 2016 +0100

    Build with maven-debian-helper
---
 debian/build.properties                        | 13 -----
 debian/build.xml                               | 72 --------------------------
 debian/changelog                               |  1 +
 debian/control                                 | 20 +++----
 debian/libmodello-java-doc.install             |  1 +
 debian/libmodello-java.poms                    | 55 +++++++++++++++-----
 debian/maven.ignoreRules                       | 10 ++++
 debian/maven.properties                        |  5 ++
 debian/patches/02-ignore-removed-modules.patch | 15 ++++++
 debian/patches/series                          |  2 +-
 debian/rules                                   | 35 ++-----------
 11 files changed, 87 insertions(+), 142 deletions(-)

diff --git a/debian/build.properties b/debian/build.properties
deleted file mode 100644
index ceffebf..0000000
--- a/debian/build.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-classpath.compile=\
-           /usr/share/java/plexus-container-default.jar:\
-           /usr/share/java/plexus-compiler-api.jar:\
-           /usr/share/java/plexus-compiler-javac.jar:\
-           /usr/share/java/plexus-utils.jar:\
-           ${basedir}/modello-core/build/modello-core-${version}.jar:\
-           ${basedir}/modello-plugins/modello-plugin-java/build/modello-plugin-java-${version}.jar:\
-           ${basedir}/modello-plugins/modello-plugin-xml/build/modello-plugin-xml-${version}.jar:\
-           ${basedir}/modello-plugins/modello-plugin-xsd/build/modello-plugin-xsd-${version}.jar
-classpath.test=
-javadoc.dir=build/api
-maven.test.skip=true
-build.javaVersion=1.5
diff --git a/debian/build.xml b/debian/build.xml
deleted file mode 100644
index 996ee90..0000000
--- a/debian/build.xml
+++ /dev/null
@@ -1,72 +0,0 @@
-<?xml version="1.0"?>
-
-<project name="pkg-java" default="package" basedir="..">
-
-    <property file="debian/build.properties"/>
-    <property name="maven.build" value="/usr/share/maven-ant-helper/maven-build.xml"/>
-    <property file="/usr/share/maven-ant-helper/maven-defaults.properties"/>
-
-    <macrodef name="cleanmodule">
-	    <attribute name="dir"/>
-	    <sequential>
-		  <ant target="clean" antfile="${maven.build}" dir="@{dir}">
-            <property name="debian.dir" location="debian" />
-            <property name="project.dir" value="@{dir}" />
-          </ant> 
-	    </sequential>
-    </macrodef>
-
-    <macrodef name="packagemodule">
-	    <attribute name="dir"/>
-	    <sequential>
-		<ant target="package" antfile="${maven.build}" dir="@{dir}">
-          <property name="debian.dir" location="debian" />
-          <property name="project.dir" value="@{dir}" />
-		</ant>
-	    </sequential>
-    </macrodef>
-
-    <target name="clean">
-        <delete dir="build"/>
-      <cleanmodule dir="modello-core"/>
-      <cleanmodule dir="modello-plugins/modello-plugin-java"/>
-      <cleanmodule dir="modello-plugins/modello-plugin-converters"/>
-      <cleanmodule dir="modello-plugins/modello-plugin-dom4j"/>
-      <cleanmodule dir="modello-plugins/modello-plugin-jdom"/>
-      <cleanmodule dir="modello-plugins/modello-plugin-stax"/>
-      <cleanmodule dir="modello-plugins/modello-plugin-xsd"/>
-      <cleanmodule dir="modello-plugins/modello-plugin-xdoc"/>
-      <cleanmodule dir="modello-plugins/modello-plugin-xml"/>
-      <cleanmodule dir="modello-plugins/modello-plugin-xpp3"/>
-    </target>
-
-    <target name="package">
-      <packagemodule dir=""/>
-      <packagemodule dir="modello-core"/>
-      <packagemodule dir="modello-plugins/modello-plugin-java"/>
-      <packagemodule dir="modello-plugins/modello-plugin-converters"/>
-      <packagemodule dir="modello-plugins/modello-plugin-xml"/>
-      <packagemodule dir="modello-plugins/modello-plugin-dom4j"/>
-      <packagemodule dir="modello-plugins/modello-plugin-jdom"/>
-      <packagemodule dir="modello-plugins/modello-plugin-stax"/>
-      <packagemodule dir="modello-plugins/modello-plugin-xsd"/>
-      <packagemodule dir="modello-plugins/modello-plugin-xdoc"/>
-      <packagemodule dir="modello-plugins/modello-plugin-xpp3"/>
-    </target>
-
-    <target name="javadoc">
-        <javadoc destdir="${javadoc.dir}">
-        <packageset dir="modello-core/src/main/java/"/>
-	    <packageset dir="modello-plugins/modello-plugin-java/src/main/java/"/>
-	    <packageset dir="modello-plugins/modello-plugin-converters/src/main/java/"/>
-	    <packageset dir="modello-plugins/modello-plugin-dom4j/src/main/java/"/>
-	    <packageset dir="modello-plugins/modello-plugin-jdom/src/main/java/"/>
-	    <packageset dir="modello-plugins/modello-plugin-stax/src/main/java/"/>
-	    <packageset dir="modello-plugins/modello-plugin-xdoc/src/main/java/"/>
-	    <packageset dir="modello-plugins/modello-plugin-xml/src/main/java/"/>
-	    <packageset dir="modello-plugins/modello-plugin-xpp3/src/main/java/"/>
-	    <packageset dir="modello-plugins/modello-plugin-xsd/src/main/java/"/>
-        </javadoc>
-    </target>
-
-</project>
diff --git a/debian/changelog b/debian/changelog
index 0518289..cc9d5e2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
 modello (1.8.3-2) UNRELEASED; urgency=medium
 
   * Team upload.
+  * Build with maven-debian-helper
   * Standards-Version updated to 3.9.7 (no changes)
 
  -- Emmanuel Bourg <ebourg at apache.org>  Tue, 16 Feb 2016 08:44:30 +0100
diff --git a/debian/control b/debian/control
index 0bd0602..e45dfd5 100644
--- a/debian/control
+++ b/debian/control
@@ -5,18 +5,16 @@ Maintainer: Debian Java Maintainers <pkg-java-maintainers at lists.alioth.debian.or
 Uploaders: Torsten Werner <twerner at debian.org>,
            Ludovic Claude <ludovic.claude at laposte.net>,
            Damien Raude-Morvan <drazzib at debian.org>
-Build-Depends-Indep: ant,
-                     ant-optional,
-                     default-jdk-doc,
+Build-Depends: debhelper (>= 9), default-jdk
+Build-Depends-Indep: default-jdk-doc,
                      junit,
+                     libmaven-dependency-plugin-java,
+                     libmaven-javadoc-plugin-java,
                      libplexus-build-api-java,
                      libplexus-compiler-java,
                      libplexus-containers-java (>= 1.0~beta3.0.7),
                      libplexus-containers-java-doc,
-                     libplexus-utils-java-doc,
-                     maven-ant-helper (>> 4),
-                     maven-repo-helper
-Build-Depends: cdbs, debhelper (>= 9), default-jdk
+                     maven-debian-helper
 Standards-Version: 3.9.7
 Vcs-Git: git://anonscm.debian.org/pkg-java/modello.git
 Vcs-Browser: http://anonscm.debian.org/cgit/pkg-java/modello.git
@@ -24,10 +22,8 @@ Homepage: http://modello.codehaus.org
 
 Package: libmodello-java
 Architecture: all
-Depends: libplexus-build-api-java,
-         libplexus-containers-java (>= 1.0~beta3.0.7),
-         ${misc:Depends}
-Suggests: libmodello-java-doc
+Depends: ${misc:Depends}, ${maven:Depends}
+Suggests: ${maven:OptionalDepends}, libmodello-java-doc
 Description: Data Model toolkit in use by the Maven 2 Project
  Once a DataModel is defined, the toolkit can be used to generate any of the
  following at compile time.
@@ -43,7 +39,7 @@ Description: Data Model toolkit in use by the Maven 2 Project
 Package: libmodello-java-doc
 Architecture: all
 Section: doc
-Depends: default-jdk-doc, ${misc:Depends}
+Depends: ${misc:Depends}, ${maven:DocDepends}
 Suggests: libmodello-java
 Description: Data Model toolkit in use by the Maven 2 Project (documentation)
  Once a DataModel is defined, the toolkit can be used to generate any of the
diff --git a/debian/libmodello-java-doc.install b/debian/libmodello-java-doc.install
new file mode 100644
index 0000000..a069d87
--- /dev/null
+++ b/debian/libmodello-java-doc.install
@@ -0,0 +1 @@
+target/site/apidocs/* usr/share/doc/libmodello-java/api
diff --git a/debian/libmodello-java.poms b/debian/libmodello-java.poms
index 86f1754..04d3417 100644
--- a/debian/libmodello-java.poms
+++ b/debian/libmodello-java.poms
@@ -1,12 +1,43 @@
-pom.xml --no-parent
-modello-core/pom.xml
-modello-plugins/pom.xml
-modello-plugins/modello-plugin-converters/pom.xml
-modello-plugins/modello-plugin-dom4j/pom.xml
-modello-plugins/modello-plugin-java/pom.xml
-modello-plugins/modello-plugin-jdom/pom.xml
-modello-plugins/modello-plugin-stax/pom.xml
-modello-plugins/modello-plugin-xdoc/pom.xml
-modello-plugins/modello-plugin-xml/pom.xml
-modello-plugins/modello-plugin-xpp3/pom.xml
-modello-plugins/modello-plugin-xsd/pom.xml
+# 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 --no-parent --has-package-version
+modello-core/pom.xml --has-package-version
+modello-plugins/pom.xml --has-package-version
+modello-plugins/modello-plugin-converters/pom.xml --has-package-version
+modello-plugins/modello-plugin-dom4j/pom.xml --has-package-version
+modello-plugins/modello-plugin-jackson/pom.xml --ignore
+modello-plugins/modello-plugin-java/pom.xml --has-package-version
+modello-plugins/modello-plugin-jdom/pom.xml --has-package-version
+modello-plugins/modello-plugin-jsonschema/pom.xml --ignore
+modello-plugins/modello-plugin-sax/pom.xml --has-package-version
+modello-plugins/modello-plugin-snakeyaml/pom.xml --ignore
+modello-plugins/modello-plugin-stax/pom.xml --has-package-version
+modello-plugins/modello-plugin-xdoc/pom.xml --has-package-version
+modello-plugins/modello-plugin-xml/pom.xml --has-package-version
+modello-plugins/modello-plugin-xpp3/pom.xml --has-package-version
+modello-plugins/modello-plugin-xsd/pom.xml --has-package-version
diff --git a/debian/maven.ignoreRules b/debian/maven.ignoreRules
new file mode 100644
index 0000000..53f337e
--- /dev/null
+++ b/debian/maven.ignoreRules
@@ -0,0 +1,10 @@
+
+dom4j dom4j
+javax.persistence persistence-api
+javax.xml.bind jaxb-api
+org.apache.maven.plugins maven-assembly-plugin
+org.apache.maven.plugins maven-project-info-reports-plugin
+org.apache.maven.plugins maven-site-plugin
+org.codehaus.modello modello-test
+org.codehaus.woodstox wstx-asl
+xmlunit xmlunit
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/patches/02-ignore-removed-modules.patch b/debian/patches/02-ignore-removed-modules.patch
new file mode 100644
index 0000000..1b457d4
--- /dev/null
+++ b/debian/patches/02-ignore-removed-modules.patch
@@ -0,0 +1,15 @@
+Description: Ignore the modules removed from the upstream tarball
+Author: Emmanuel Bourg <ebourg at apache.org>
+Forwarded: not-needed
+--- a/pom.xml
++++ b/pom.xml
+@@ -174,9 +174,7 @@
+   </mailingLists>
+ 
+   <modules>
+-    <module>modello-maven-plugin</module>
+     <module>modello-core</module>
+-    <module>modello-test</module>
+     <module>modello-plugins</module>
+   </modules>
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 1568c7d..a0e8fb6 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,2 @@
 01-plexus-utils-compatibility.patch
-
+02-ignore-removed-modules.patch
diff --git a/debian/rules b/debian/rules
index c20d25a..cb50639 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,36 +1,7 @@
 #!/usr/bin/make -f
 
-include /usr/share/cdbs/1/rules/debhelper.mk
-include /usr/share/cdbs/1/class/ant.mk
-
-PACKAGE              := $(DEB_SOURCE_PACKAGE)
-VERSION              := $(DEB_UPSTREAM_VERSION)
-JAVA_HOME            := /usr/lib/jvm/default-java
-DEB_JARS             := ant-nodeps junit plexus-build-api plexus-compiler-api \
-  plexus-compiler-javac plexus-velocity plexus-utils velocity
-DEB_ANT_BUILD_TARGET := package javadoc
-DEB_ANT_BUILDFILE    := debian/build.xml
-DEB_ANT_ARGS         := -Dpackage=$(PACKAGE) -Dversion=$(VERSION)
-API_DOCS             := build/api
-BASE_MODULES         := core
-PLUGINS              := converters dom4j java jdom stax xdoc \
-  xml xpp3 xsd
+%:
+	dh $@ --buildsystem=maven
 
 get-orig-source:
-	uscan --force-download --download-version $(VERSION) --rename
-
-binary-post-install/lib$(PACKAGE)-java::
-	mh_installpoms -plib$(PACKAGE)-java 
-	set -e; for MODULE in $(BASE_MODULES); do \
-	  mh_installjar -plib$(PACKAGE)-java -l modello-$$MODULE/pom.xml modello-$$MODULE/build/modello-$$MODULE-$(VERSION).jar; \
-	done
-	set -e; for MODULE in $(PLUGINS); do \
-	  mh_installjar -plib$(PACKAGE)-java -l modello-plugins/modello-plugin-$$MODULE/pom.xml modello-plugins/modello-plugin-$$MODULE/build/modello-plugin-$$MODULE-$(VERSION).jar; \
-	done
-
-binary-post-install/lib$(PACKAGE)-java-doc::
-	dh_install -plib$(PACKAGE)-java-doc $(API_DOCS) usr/share/doc/lib$(PACKAGE)-java
-
-clean::
-	mh_clean
-	mh_unpatchpoms -plib$(PACKAGE)-java
+	uscan --force-download --download-current-version --rename

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



More information about the pkg-java-commits mailing list