[geronimo-jacc-1.1-spec] 06/11: Build with maven-debian-helper instead of ant

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Mon May 30 11:03:59 UTC 2016


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

ebourg-guest pushed a commit to branch master
in repository geronimo-jacc-1.1-spec.

commit 4771ee26bf2c653fa6e3af28c8be2e5f6f98876f
Author: Emmanuel Bourg <ebourg at apache.org>
Date:   Mon May 30 11:51:27 2016 +0200

    Build with maven-debian-helper instead of ant
---
 debian/build.xml                             | 70 ----------------------------
 debian/changelog                             |  1 +
 debian/control                               |  5 +-
 debian/libgeronimo-jacc-1.1-spec-java.poms   | 28 +++++++++++
 debian/maven.rules                           |  2 +
 debian/patches/01-missing-dependencies.patch | 18 +++++++
 debian/patches/series                        |  1 +
 debian/rules                                 | 29 ++----------
 8 files changed, 55 insertions(+), 99 deletions(-)

diff --git a/debian/build.xml b/debian/build.xml
deleted file mode 100644
index 95f4206..0000000
--- a/debian/build.xml
+++ /dev/null
@@ -1,70 +0,0 @@
-<?xml version="1.0"?>
-
-<project name="pkg-java" default="package" basedir="..">
-
-    <property name="build.sourceDirectory" value="src/main/java"/>
-    <property name="build.resourcesDirectory" value="src/main/resources"/>
-    <property name="build.testDirectory" value="src/test/java"/>
-    <property name="build.directory" value="build"/>
-    <property name="build.outputDirectory" value="${build.directory}/classes"/>
-
-    <target name="init">
-        <available property="available.resources" file="${build.resourcesDirectory}"/>
-    </target>
-
-    <target name="clean">
-        <delete dir="${build.directory}"/>
-        <delete>
-            <fileset dir="${build.testDirectory}" includes="**/*.class"/>
-        </delete>
-    </target>
-
-    <target name="process-resources" depends="init" if="available.resources">
-        <mkdir dir="${build.outputDirectory}"/>
-        <copy todir="${build.outputDirectory}">
-            <fileset dir="${build.resourcesDirectory}"/>
-        </copy>
-    </target>
-
-    <target name="compile" depends="process-resources">
-        <mkdir dir="${build.outputDirectory}"/>
-        <javac
-            destdir="${build.outputDirectory}"
-            nowarn="true"
-            source="${sourceVersion}" target="${targetVersion}"
-            debug="on">
-            <src path="${build.sourceDirectory}"/>
-        </javac>
-    </target>
-
-    <target name="package" depends="compile">
-        <jar jarfile="${build.directory}/${artifactId}-${artifactVersion}.jar"
-            basedir="${build.outputDirectory}"/>
-    </target>
-
-    <target name="compile_test">
-        <javac destdir="${build.testDirectory}" debug="true"
-               source="${sourceVersion}" target="${targetVersion}">
-            <src path="${build.testDirectory}"/>
-            <classpath>
-                <pathelement location="${build.directory}/${artifactId}-${artifactVersion}.jar"/>
-                <pathelement location="${build.testDirectory}"/>
-            </classpath>
-        </javac>
-    </target>
-    <target name="test" depends="compile_test">
-        <junit haltonfailure="yes">
-            <classpath>
-                <pathelement location="${build.directory}/${artifactId}-${artifactVersion}.jar"/>
-                <pathelement location="${build.testDirectory}"/>
-            </classpath>
-            <formatter type="plain" usefile="false"/>
-            <batchtest>
-                <fileset dir="${build.testDirectory}">
-                    <include name="**/*Test.java"/>
-                    <include name="**/*TestCase.java"/>
-                </fileset>
-            </batchtest>
-        </junit>
-    </target>
-</project>
diff --git a/debian/changelog b/debian/changelog
index 225a75c..6686570 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
 geronimo-jacc-1.1-spec (1.0.1-2) UNRELEASED; urgency=medium
 
   * Team upload.
+  * Build with maven-debian-helper instead of ant
   * Package adopted by the Java Team
   * Standards-Version updated to 3.9.8 (no changes)
   * Removed the deprecated DM-Upload-Allowed field
diff --git a/debian/control b/debian/control
index 6fc129a..1cbc935 100644
--- a/debian/control
+++ b/debian/control
@@ -3,8 +3,7 @@ Section: java
 Priority: optional
 Maintainer: Debian Java Maintainers <pkg-java-maintainers at lists.alioth.debian.org>
 Uploaders: Chris Grzegorczyk <grze at eucalyptus.com>, Graziano Obertelli <graziano at eucalyptus.com>, Kyo Lee <kyo.lee at eucalyptus.com>
-Build-Depends-Indep: default-jdk, libservlet2.5-java, junit, maven-repo-helper
-Build-Depends: ant-optional, debhelper (>= 5), cdbs (>= 0.4.5.3)
+Build-Depends: default-jdk, debhelper (>= 5), maven-debian-helper, libservlet2.5-java, junit
 Standards-Version: 3.9.8
 Vcs-Git: https://anonscm.debian.org/git/pkg-java/geronimo-jacc-1.1-spec.git
 Vcs-Browser: https://anonscm.debian.org/cgit/pkg-java/geronimo-jacc-1.1-spec.git
@@ -12,7 +11,7 @@ Homepage: http://geronimo.apache.org
 
 Package: libgeronimo-jacc-1.1-spec-java
 Architecture: all
-Depends: default-jre-headless | java5-runtime-headless, ${misc:Depends}
+Depends: ${misc:Depends}, ${maven:Depends}
 Description: Geronimo API implementation of the JACC 1.1 spec
  The goal of the Geronimo project is to produce a server runtime framework
  that pulls together the best Open Source alternatives to create runtimes
diff --git a/debian/libgeronimo-jacc-1.1-spec-java.poms b/debian/libgeronimo-jacc-1.1-spec-java.poms
new file mode 100644
index 0000000..64b1188
--- /dev/null
+++ b/debian/libgeronimo-jacc-1.1-spec-java.poms
@@ -0,0 +1,28 @@
+# 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 --java-lib
diff --git a/debian/maven.rules b/debian/maven.rules
new file mode 100644
index 0000000..6c74f24
--- /dev/null
+++ b/debian/maven.rules
@@ -0,0 +1,2 @@
+s/org.apache.geronimo.specs/javax.servlet/ s/geronimo-servlet_2.5_spec/servlet-api/ * s/.*/2.5/ * *
+junit junit * s/.*/3.x/ * * 
diff --git a/debian/patches/01-missing-dependencies.patch b/debian/patches/01-missing-dependencies.patch
new file mode 100644
index 0000000..6f7bd84
--- /dev/null
+++ b/debian/patches/01-missing-dependencies.patch
@@ -0,0 +1,18 @@
+Description: Declare the missing dependencies specified in the parent pom
+Author: Emmanuel Bourg <ebourg at apache.org>
+Forwarded: not-needed
+--- a/pom.xml
++++ b/pom.xml
+@@ -47,6 +47,12 @@
+             <version>1.1.2</version>
+             <scope>provided</scope>
+         </dependency>
++        <dependency>
++            <groupId>junit</groupId>
++            <artifactId>junit</artifactId>
++            <version>3.x</version>
++            <scope>test</scope>
++        </dependency>
+     </dependencies>
+ 
+     <scm>
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..f47db61
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+01-missing-dependencies.patch
diff --git a/debian/rules b/debian/rules
index 4289399..aba914b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,30 +1,7 @@
 #!/usr/bin/make -f
 
-include /usr/share/cdbs/1/rules/debhelper.mk
-include /usr/share/cdbs/1/class/ant.mk
-
-SVN                  := tags/geronimo-jacc_1.1_spec-$(DEB_UPSTREAM_VERSION)
-ASFREPO              := http://svn.apache.org/repos/asf/geronimo/specs/$(SVN)
-REQUIRED_JVM_VERSION := 1.5
-
-JAVA_HOME            := /usr/lib/jvm/default-java
-DEB_ANT_BUILDFILE    := debian/build.xml
-DEB_ANT_ARGS         := -DartifactVersion=$(DEB_UPSTREAM_VERSION) \
-                        -DartifactId=$(DEB_SOURCE_PACKAGE) \
-                        -DsourceVersion=$(REQUIRED_JVM_VERSION) \
-                        -DtargetVersion=$(REQUIRED_JVM_VERSION)
-DEB_JARS             := servlet-api-2.5 junit ant-junit
-DEB_ANT_CHECK_TARGET := test
-
-binary-post-install/lib$(DEB_SOURCE_PACKAGE)-java::
-	mh_installpom -plib$(DEB_SOURCE_PACKAGE)-java pom.xml --no-parent
-	mh_installjar -plib$(DEB_SOURCE_PACKAGE)-java pom.xml -l build/$(DEB_SOURCE_PACKAGE)-$(DEB_UPSTREAM_VERSION).jar
+%:
+	dh $@ --buildsystem=maven
 
 get-orig-source:
-	echo "Getting version $(DEB_UPSTREAM_VERSION) from $(SVN)"
-	mkdir orig_tmp
-	cd orig_tmp && \
-		svn export -q $(ASFREPO) $(DEB_SOURCE_PACKAGE)-$(DEB_UPSTREAM_VERSION) && \
-		tar czf ../../$(DEB_SOURCE_PACKAGE)_$(DEB_UPSTREAM_VERSION).orig.tar.gz $(DEB_SOURCE_PACKAGE)-$(DEB_UPSTREAM_VERSION)
-	rm -rf orig_tmp
-
+	uscan --download-current-version --force-download --no-symlink

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/geronimo-jacc-1.1-spec.git



More information about the pkg-java-commits mailing list