[qdox] 03/05: Build with maven-debian-helper instead of maven-ant-helper
Emmanuel Bourg
ebourg-guest at moszumanska.debian.org
Wed Aug 2 09:06:55 UTC 2017
This is an automated email from the git hooks/post-receive script.
ebourg-guest pushed a commit to branch master
in repository qdox.
commit d16cc78078d05ca70b8c8570f646e3f9e88f1cca
Author: Emmanuel Bourg <ebourg at apache.org>
Date: Wed Aug 2 09:27:50 2017 +0200
Build with maven-debian-helper instead of maven-ant-helper
---
debian/build-classpath | 4 ---
debian/build.properties | 5 ---
debian/build.xml | 71 -----------------------------------------
debian/changelog | 1 +
debian/control | 19 +++++------
debian/libqdox-java-doc.docs | 1 -
debian/libqdox-java-doc.install | 1 +
debian/libqdox-java.poms | 3 +-
debian/maven.ignoreRules | 4 +++
debian/maven.properties | 2 ++
debian/rules | 17 +++++-----
11 files changed, 25 insertions(+), 103 deletions(-)
diff --git a/debian/build-classpath b/debian/build-classpath
deleted file mode 100644
index 7c714f1..0000000
--- a/debian/build-classpath
+++ /dev/null
@@ -1,4 +0,0 @@
-/usr/share/java/ant-nodeps.jar
-/usr/share/java/ant-junit.jar
-/usr/share/java/junit.jar
-
diff --git a/debian/build.properties b/debian/build.properties
deleted file mode 100644
index 1c67897..0000000
--- a/debian/build.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-maven.test.skip=true
-javadoc.dir=build/docs/api
-build.sourceDirectory=src/java
-build.testSourceDirectory=src/test
-qdox.byaccj.executable=byaccj
diff --git a/debian/build.xml b/debian/build.xml
deleted file mode 100644
index d5b12ba..0000000
--- a/debian/build.xml
+++ /dev/null
@@ -1,71 +0,0 @@
-<?xml version="1.0"?>
-
-<project name="pkg-java" default="all" 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>
-
- <macrodef name="javadocmodule">
- <attribute name="dir"/>
- <sequential>
- <ant target="javadoc-jar"
- antfile="${maven.build}" dir="@{dir}"/>
- </sequential>
- </macrodef>
-
- <target name="clean">
- <delete dir="build"/>
- <cleanmodule dir=""/>
- </target>
-
- <target name="package">
- <java classpath="/usr/share/java/jflex.jar" classname="jflex.Main" fork="true">
- <arg value="-d" />
- <arg value="${build.directory}/generated-sources/com/thoughtworks/qdox/parser/impl" />
- <arg value="--skel" />
- <arg value="src/grammar/skeleton.inner" />
- <arg value="src/grammar/lexer.flex" />
- </java>
- <exec executable="${qdox.byaccj.executable}" dir="${build.directory}/generated-sources/com/thoughtworks/qdox/parser/impl"
- failonerror="true">
- <arg value="-v" />
- <arg value="-Jnorun" />
- <arg value="-Jnoconstruct" />
- <arg value="-Jclass=Parser" />
- <arg value="-Jsemantic=Value" />
- <arg value="-Jpackage=com.thoughtworks.qdox.parser.impl" />
- <arg value="${basedir}/src/grammar/parser.y" />
- </exec>
- <move tofile="${build.directory}/yacc-states.txt" file="${build.directory}/generated-sources/com/thoughtworks/qdox/parser/impl/y.output" />
-
- <packagemodule dir=""/>
- </target>
-
- <target name="javadoc">
- <javadocmodule dir="."/>
- </target>
-
- <target name="all" depends="package,javadoc" />
-
-</project>
diff --git a/debian/changelog b/debian/changelog
index e25919b..e5198eb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
qdox (1.12.1-3) UNRELEASED; urgency=medium
* Team upload.
+ * Build with maven-debian-helper instead of maven-ant-helper
* Standards-Version updated to 4.0.0
* Switch to debhelper level 10
diff --git a/debian/control b/debian/control
index 7d58b0f..67fc9cd 100644
--- a/debian/control
+++ b/debian/control
@@ -3,15 +3,13 @@ Section: java
Priority: optional
Maintainer: Debian Java Maintainers <pkg-java-maintainers at lists.alioth.debian.org>
Uploaders: Ludovic Claude <ludovic.claude at laposte.net>, Damien Raude-Morvan <drazzib at debian.org>
-Build-Depends: byacc-j, debhelper (>= 10), default-jdk
-Build-Depends-Indep: ant,
- ant-optional,
- default-jdk-doc,
+Build-Depends: byacc-j, debhelper (>= 10), default-jdk, maven-debian-helper (>= 2.2)
+Build-Depends-Indep: default-jdk-doc,
jflex (>= 1.6.1),
junit (>= 3.8.1),
libjmock-java (>= 1.0.1),
- maven-ant-helper (>= 7.1),
- maven-repo-helper (>= 1.5)
+ libmaven-antrun-plugin-java,
+ libmaven-javadoc-plugin-java
Standards-Version: 4.0.0
Vcs-Git: https://anonscm.debian.org/git/pkg-java/qdox.git
Vcs-Browser: https://anonscm.debian.org/cgit/pkg-java/qdox.git
@@ -19,8 +17,8 @@ Homepage: https://github.com/codehaus/qdox
Package: libqdox-java
Architecture: all
-Depends: ${misc:Depends}
-Suggests: libqdox-java-doc
+Depends: ${misc:Depends}, ${maven:Depends}
+Suggests: ${maven:OptionalDepends}, libqdox-java-doc
Description: Quickly parses declarations and Javadoc from Java source
qdox quickly parses Java source files looking for key items of
interest:
@@ -37,9 +35,8 @@ Description: Quickly parses declarations and Javadoc from Java source
Package: libqdox-java-doc
Section: doc
Architecture: all
-Depends: ${misc:Depends}
-Recommends: default-jdk-doc
-Suggests: libqdox-java
+Depends: ${maven:DocDepends}, ${misc:Depends}
+Suggests: ${maven:DocOptionalDepends}
Description: Documentation for qdox (javadoc)
This package contains the documentation for qdox, generated from
Javadoc.
diff --git a/debian/libqdox-java-doc.docs b/debian/libqdox-java-doc.docs
deleted file mode 100644
index e551a05..0000000
--- a/debian/libqdox-java-doc.docs
+++ /dev/null
@@ -1 +0,0 @@
-build/docs/api
diff --git a/debian/libqdox-java-doc.install b/debian/libqdox-java-doc.install
new file mode 100644
index 0000000..9d9dcae
--- /dev/null
+++ b/debian/libqdox-java-doc.install
@@ -0,0 +1 @@
+target/apidocs/* /usr/share/doc/libqdox-java/api
diff --git a/debian/libqdox-java.poms b/debian/libqdox-java.poms
index 6269869..9ac7e64 100644
--- a/debian/libqdox-java.poms
+++ b/debian/libqdox-java.poms
@@ -1,2 +1 @@
-pom.xml --no-parent --has-package-version --java-lib --artifact=build/qdox-*.jar
-build/qdox.javadoc.pom --has-package-version --artifact=build/qdox.javadoc.jar --classifier=javadoc --ignore-pom --package=libqdox-java-doc
+pom.xml --no-parent --has-package-version --java-lib
diff --git a/debian/maven.ignoreRules b/debian/maven.ignoreRules
new file mode 100644
index 0000000..8064bb1
--- /dev/null
+++ b/debian/maven.ignoreRules
@@ -0,0 +1,4 @@
+de.jflex maven-jflex-plugin
+org.apache.maven.plugins maven-assembly-plugin
+org.apache.maven.wagon wagon-webdav
+org.codehaus.xsite xsite-maven-plugin
diff --git a/debian/maven.properties b/debian/maven.properties
new file mode 100644
index 0000000..b38253b
--- /dev/null
+++ b/debian/maven.properties
@@ -0,0 +1,2 @@
+maven.test.skip=true
+qdox.byaccj.executable=byaccj
diff --git a/debian/rules b/debian/rules
index 7940821..d81c512 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,15 +1,14 @@
#!/usr/bin/make -f
-DEB_SOURCE_PACKAGE := $(shell dpkg-parsechangelog | grep '^Source:' | cut -f 2 -d ' ')
-DEB_UPSTREAM_VERSION := $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ' | cut -d: -f2- | sed 's/-[^-]*$$//')
+%:
+ dh $@
-export JAVA_HOME=/usr/lib/jvm/default-java
-export CLASSPATH=$(shell for jar in `cat debian/build-classpath`; do if [ -f "$$jar" ]; then echo -n "$${jar}:"; fi; done)
-export ANT_ARGS=-Dbasedir=$(realpath .) -Dpackage=$(DEB_SOURCE_PACKAGE) -Dversion=$(DEB_UPSTREAM_VERSION) -f debian/build.xml
+override_dh_auto_build:
+ # Compile the grammar since maven-jflex-plugin is missing
+ #mkdir -p target/generated-sources/parser/com/thoughtworks/qdox/parser/impl
+ java -cp /usr/share/java/jflex.jar jflex.Main -d target/generated-sources/parser/com/thoughtworks/qdox/parser/impl --skel src/grammar/skeleton.inner src/grammar/lexer.flex
-%:
- dh $@ --buildsystem=ant --with maven_repo_helper
+ dh_auto_build
get-orig-source:
- -uscan --download-version $(DEB_UPSTREAM_VERSION) --force-download --rename
-
+ uscan --download-current-version --force-download --rename
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/qdox.git
More information about the pkg-java-commits
mailing list