[tomcat8] 03/16: Simplified the ant invocation in debian/rules and moved some properties to debian/ant.properties

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Thu May 7 13:08:02 UTC 2015


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

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

commit ce41eff18d994163954ad56cfcfcb62b9c23f6e9
Author: Emmanuel Bourg <ebourg at apache.org>
Date:   Thu May 7 10:48:00 2015 +0200

    Simplified the ant invocation in debian/rules and moved some properties to debian/ant.properties
---
 debian/ant.properties |  8 ++++++++
 debian/changelog      |  2 ++
 debian/rules          | 25 ++-----------------------
 3 files changed, 12 insertions(+), 23 deletions(-)

diff --git a/debian/ant.properties b/debian/ant.properties
new file mode 100644
index 0000000..b4b78a7
--- /dev/null
+++ b/debian/ant.properties
@@ -0,0 +1,8 @@
+compile.debug=true
+
+jdt.jar=/usr/share/java/ecj.jar
+junit.jar=/usr/share/java/junit4.jar
+cglib.jar=/usr/share/java/cglib3-nodep.jar
+easymock.jar=/usr/share/java/easymock.jar
+hamcrest.jar=/usr/share/java/hamcrest-core.jar
+objenesis.jar=/usr/share/java/objenesis.jar
diff --git a/debian/changelog b/debian/changelog
index 457d6e6..b21eed4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,8 @@ tomcat8 (8.0.22-2) UNRELEASED; urgency=medium
 
   * debian/rules:
     - Modified to use the dh sequencer
+    - Simplified the ant invocation and moved some properties
+      to debian/ant.properties
 
  -- Emmanuel Bourg <ebourg at apache.org>  Thu, 07 May 2015 08:34:56 +0200
 
diff --git a/debian/rules b/debian/rules
index 3bbc099..778ab1f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,20 +1,7 @@
 #!/usr/bin/make -f
 
 JAVA_HOME := /usr/lib/jvm/default-java
-JAVA_CMD := $(JAVA_HOME)/bin/java
 BLDLIB := output/build/lib
-DEB_JARS_BASE := /usr/share/java
-DEB_JARS := ant ant-launcher ant-trax ant-nodeps ant-junit4 ant-junit junit4 hamcrest-1.3
-DEB_CLASSPATH = $(shell for jar in $(DEB_JARS); do \
-	if [ -f "$$jar" ]; then echo -n "$${jar}:"; fi; \
-	if [ -f "$$jar".jar ]; then echo -n "$${jar}.jar:"; fi; \
-	if [ -f $(DEB_JARS_BASE)/"$$jar" ]; then \
-		echo -n "$(DEB_JARS_BASE)/$${jar}:"; fi; \
-	if [ -f $(DEB_JARS_BASE)/"$$jar".jar ]; then \
-		echo -n "$(DEB_JARS_BASE)/$${jar}.jar:"; fi; \
-	done; \
-	if [ -f "$(JAVA_HOME)/lib/tools.jar" ]; then \
-		echo -n "$(JAVA_HOME)/lib/tools.jar"; fi)
 
 # Upstream version
 T_VER := $(shell dpkg-parsechangelog | egrep '^Version:' \
@@ -31,14 +18,7 @@ RWFILES := $(RWLOC)/index.html $(RWLOC)/META-INF/context.xml
 # Add distribution.name as system property to grab it when showing version
 TOMCAT_DISTRIBUTION := "$(shell lsb_release -si)"
 
-ANT_ARGS := -Dcompile.debug=true \
-	-Djdt.jar=/usr/share/java/ecj.jar \
-	-Djunit.jar=/usr/share/java/junit4.jar \
-	-Dcglib.jar=/usr/share/java/cglib3-nodep.jar \
-	-Deasymock.jar=/usr/share/java/easymock.jar \
-	-Dhamcrest.jar=/usr/share/java/hamcrest-core.jar \
-	-Dobjenesis.jar=/usr/share/java/objenesis.jar \
-	-Dversion=$(T_VER) \
+ANT_ARGS := -Dversion=$(T_VER) \
 	-Dversion.major="$(T_VER_MAJOR)" \
 	-Dversion.minor="$(T_VER_MINOR)" \
 	-Dversion.build="$(T_VER_BUILD)" \
@@ -46,8 +26,7 @@ ANT_ARGS := -Dcompile.debug=true \
         -Ddistribution.name=$(TOMCAT_DISTRIBUTION) \
 	-Dversion.suffix=""
 
-ANT_INVOKE := $(JAVA_CMD) -classpath "$(DEB_CLASSPATH)" org.apache.tools.ant.Main $(ANT_ARGS)
-
+ANT_INVOKE := ant $(ANT_ARGS) -propertyfile debian/ant.properties
 
 %:
 	dh $@

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



More information about the pkg-java-commits mailing list