[pkg-java] r7454 - trunk/modello/debian
twerner at alioth.debian.org
twerner at alioth.debian.org
Sat Nov 29 12:41:44 UTC 2008
Author: twerner
Date: 2008-11-29 12:41:43 +0000 (Sat, 29 Nov 2008)
New Revision: 7454
Modified:
trunk/modello/debian/build.xml
trunk/modello/debian/changelog
trunk/modello/debian/rules
Log:
Refactor the build process.
Modified: trunk/modello/debian/build.xml
===================================================================
--- trunk/modello/debian/build.xml 2008-11-29 12:16:54 UTC (rev 7453)
+++ trunk/modello/debian/build.xml 2008-11-29 12:41:43 UTC (rev 7454)
@@ -6,27 +6,40 @@
<property name="maven.test.skip" value="true"/>
<property file="/usr/share/maven-ant-helper/maven-defaults.properties"/>
+ <macrodef name="cleanmodule">
+ <attribute name="dir"/>
+ <sequential>
+ <ant target="clean"
+ antfile="/usr/share/maven-ant-helper/maven-build.xml" dir="@{dir}"/>
+ </sequential>
+ </macrodef>
+
+ <macrodef name="packagemodule">
+ <attribute name="dir"/>
+ <attribute name="artifactId"/>
+ <sequential>
+ <ant target="package"
+ antfile="/usr/share/maven-ant-helper/maven-build.xml" dir="@{dir}">
+ <property name="artifactId" value="@{artifactId}"/>
+ </ant>
+ </sequential>
+ </macrodef>
+
<target name="clean">
<delete dir="build"/>
- <ant target="clean" antfile="/usr/share/maven-ant-helper/maven-build.xml" dir="modello-test"/>
- <ant target="clean" antfile="/usr/share/maven-ant-helper/maven-build.xml" dir="modello-core"/>
- <ant target="clean" antfile="/usr/share/maven-ant-helper/maven-build.xml" dir="modello-plugins/modello-plugin-xml"/>
- <ant target="clean" antfile="/usr/share/maven-ant-helper/maven-build.xml" dir="modello-plugins/modello-plugin-xpp3"/>
+ <cleanmodule dir="modello-test"/>
+ <cleanmodule dir="modello-core"/>
+ <cleanmodule dir="modello-plugins/modello-plugin-xml"/>
+ <cleanmodule dir="modello-plugins/modello-plugin-xpp3"/>
</target>
<target name="package">
- <ant target="package" antfile="/usr/share/maven-ant-helper/maven-build.xml" dir="modello-test">
- <property name="artifactId" value="modello-test"/>
- </ant>
- <ant target="package" antfile="/usr/share/maven-ant-helper/maven-build.xml" dir="modello-core">
- <property name="artifactId" value="modello-core"/>
- </ant>
- <ant target="package" antfile="/usr/share/maven-ant-helper/maven-build.xml" dir="modello-plugins/modello-plugin-xml">
- <property name="artifactId" value="modello-plugin-xml"/>
- </ant>
- <ant target="package" antfile="/usr/share/maven-ant-helper/maven-build.xml" dir="modello-plugins/modello-plugin-xpp3">
- <property name="artifactId" value="modello-plugin-xpp3"/>
- </ant>
+ <packagemodule dir="modello-test" artifactId="modello-test"/>
+ <packagemodule dir="modello-core" artifactId="modello-core"/>
+ <packagemodule dir="modello-plugins/modello-plugin-xml"
+ artifactId="modello-plugin-xml"/>
+ <packagemodule dir="modello-plugins/modello-plugin-xpp3"
+ artifactId="modello-plugin-xpp3"/>
</target>
<target name="javadoc">
Modified: trunk/modello/debian/changelog
===================================================================
--- trunk/modello/debian/changelog 2008-11-29 12:16:54 UTC (rev 7453)
+++ trunk/modello/debian/changelog 2008-11-29 12:41:43 UTC (rev 7454)
@@ -6,8 +6,9 @@
* Add Vcs-* and Homepage header.
* Bump up Standards-Version: 3.8.0.
* Build modello-test and more javadoc.
+ * Refactor the build process.
- -- Torsten Werner <twerner at debian.org> Sat, 29 Nov 2008 13:06:03 +0100
+ -- Torsten Werner <twerner at debian.org> Sat, 29 Nov 2008 13:40:56 +0100
modello (1.0-alpha-8-1) unstable; urgency=low
Modified: trunk/modello/debian/rules
===================================================================
--- trunk/modello/debian/rules 2008-11-29 12:16:54 UTC (rev 7453)
+++ trunk/modello/debian/rules 2008-11-29 12:41:43 UTC (rev 7454)
@@ -13,19 +13,21 @@
DEB_ANT_BUILDFILE := ./debian/build.xml
DEB_ANT_ARGS := -Dpackage=$(PACKAGE) -Dversion=$(VERSION)
API_DOCS := build/api
+BASE_MODULES := core test
+PLUGINS := xml xpp3
get-orig-source:
uscan --force-download
binary-post-install/lib$(PACKAGE)-java::
- dh_install -plib$(PACKAGE)-java modello-core/build/$(PACKAGE)-core-$(VERSION).jar usr/share/java
- dh_link -plib$(PACKAGE)-java usr/share/java/$(PACKAGE)-core-$(VERSION).jar usr/share/java/$(PACKAGE)-core.jar
- dh_install -plib$(PACKAGE)-java modello-plugins/modello-plugin-xml/build/$(PACKAGE)-plugin-xml-$(VERSION).jar usr/share/java
- dh_link -plib$(PACKAGE)-java usr/share/java/$(PACKAGE)-plugin-xml-$(VERSION).jar usr/share/java/$(PACKAGE)-plugin-xml.jar
- dh_install -plib$(PACKAGE)-java modello-plugins/modello-plugin-xpp3/build/$(PACKAGE)-plugin-xpp3-$(VERSION).jar usr/share/java
- dh_link -plib$(PACKAGE)-java usr/share/java/$(PACKAGE)-plugin-xpp3-$(VERSION).jar usr/share/java/$(PACKAGE)-plugin-xpp3.jar
- dh_install -plib$(PACKAGE)-java modello-test/build/$(PACKAGE)-test-$(VERSION).jar usr/share/java
- dh_link -plib$(PACKAGE)-java usr/share/java/$(PACKAGE)-test-$(VERSION).jar usr/share/java/$(PACKAGE)-test.jar
+ for MODULE in $(BASE_MODULES); do \
+ dh_install -plib$(PACKAGE)-java modello-$$MODULE/build/$(PACKAGE)-$$MODULE-$(VERSION).jar usr/share/java; \
+ dh_link -plib$(PACKAGE)-java usr/share/java/$(PACKAGE)-$$MODULE-$(VERSION).jar usr/share/java/$(PACKAGE)-$$MODULE.jar; \
+ done
+ for MODULE in $(PLUGINS); do \
+ dh_install -plib$(PACKAGE)-java modello-plugins/modello-plugin-$$MODULE/build/$(PACKAGE)-plugin-$$MODULE-$(VERSION).jar usr/share/java; \
+ dh_link -plib$(PACKAGE)-java usr/share/java/$(PACKAGE)-plugin-$$MODULE-$(VERSION).jar usr/share/java/$(PACKAGE)-plugin-$$MODULE.jar; \
+ done
binary-post-install/lib$(PACKAGE)-java-doc::
dh_install -plib$(PACKAGE)-java-doc build/api usr/share/doc/lib$(PACKAGE)-java
More information about the pkg-java-commits
mailing list