[plexus-containers] 02/35: UNRELEASED * Initial release. (Closes: #507272)
Emmanuel Bourg
ebourg-guest at moszumanska.debian.org
Tue Nov 7 08:56:51 UTC 2017
This is an automated email from the git hooks/post-receive script.
ebourg-guest pushed a commit to branch master-1.0
in repository plexus-containers.
commit 88638b30c7ccb7a029cec214681cda822a3110e7
Author: Torsten Werner <twerner at debian.org>
Date: Sat Nov 29 17:36:15 2008 +0000
UNRELEASED
* Initial release. (Closes: #507272)
---
debian/{build.properties => ant.properties} | 1 +
debian/build.xml | 51 ++++++++----
debian/changelog | 3 +-
debian/maven-build.xml | 117 ++++++++++++++++++++++++++++
debian/rules | 9 ++-
5 files changed, 160 insertions(+), 21 deletions(-)
diff --git a/debian/build.properties b/debian/ant.properties
similarity index 92%
rename from debian/build.properties
rename to debian/ant.properties
index e20961d..1245a19 100644
--- a/debian/build.properties
+++ b/debian/ant.properties
@@ -4,3 +4,4 @@ classpath.compile=/usr/share/java/classworlds.jar:\
/usr/share/java/junit.jar
classpath.test=
javadoc.dir=build/api
+maven.test.skip=true
diff --git a/debian/build.xml b/debian/build.xml
index df7b7ed..e465252 100644
--- a/debian/build.xml
+++ b/debian/build.xml
@@ -1,24 +1,41 @@
<?xml version="1.0"?>
+
+<project name="plexus-containers" default="package" basedir="..">
+
+ <property file="/usr/share/maven-ant-helper/maven-defaults.properties"/>
-<project name="pkg-java" default="package" basedir="..">
+ <macrodef name="cleanmodule">
+ <attribute name="dir"/>
+ <sequential>
+ <ant target="clean"
+ antfile="${basedir}/debian/maven-build.xml" dir="@{dir}"/>
+ </sequential>
+ </macrodef>
- <property file="debian/build.properties"/>
- <property file="/usr/share/maven-ant-helper/maven-defaults.properties"/>
- <property name="maven.test.exclude" value="**/PlexusHierarchyTest.java"/>
- <property name="maven.build.xml" value="/usr/share/maven-ant-helper/maven-build.xml"/>
+ <macrodef name="packagemodule">
+ <attribute name="dir"/>
+ <attribute name="artifactId"/>
+ <sequential>
+ <ant target="package" antfile="${basedir}/debian/maven-build.xml" dir="@{dir}">
+ <property name="artifactId" value="@{artifactId}"/>
+ </ant>
+ </sequential>
+ </macrodef>
- <target name="clean">
- <ant target="clean" antfile="${maven.build.xml}" dir="."/>
- </target>
+ <target name="clean">
+ <delete dir="build"/>
+ <cleanmodule dir="plexus-container-default"/>
+ </target>
- <target name="package">
- <ant target="package" antfile="${maven.build.xml}" dir=".">
- <property name="artifactId" value="${artfiactId}"/>
- </ant>
- <copy file="build/plexus-container-default-${version}.jar" tofile="build/plexus-container-default-1.0.jar"/>
- </target>
+ <target name="package">
+ <packagemodule dir="plexus-container-default"
+ artifactId="plexus-container-default"/>
+ </target>
+
+ <target name="javadoc">
+ <javadoc destdir="${javadoc.dir}">
+ <packageset dir="plexus-container-default/src/main/java/"/>
+ </javadoc>
+ </target>
- <target name="javadoc">
- <ant target="javadoc" antfile="${maven.build.xml}" dir="."/>
- </target>
</project>
diff --git a/debian/changelog b/debian/changelog
index 058d4bc..bc977aa 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,6 @@
plexus-containers (1.0~beta2-1) unstable; urgency=low
- * Initial release. (Closes: #xxxxxx)
+ UNRELEASED
+ * Initial release. (Closes: #507272)
-- Torsten Werner <twerner at debian.org> Sat, 29 Nov 2008 17:32:07 +0100
diff --git a/debian/maven-build.xml b/debian/maven-build.xml
new file mode 100644
index 0000000..f8a30db
--- /dev/null
+++ b/debian/maven-build.xml
@@ -0,0 +1,117 @@
+<?xml version="1.0"?>
+
+<project name="pkg-java" default="package" basedir="..">
+
+ <target name="init">
+ <available property="available.resources" file="src/main/resources"/>
+
+ <fail unless="artifactId" message="Missing required property: artifactId"/>
+ <fail unless="version" message="Missing required property: version"/>
+ <fail unless="basedir" message="Missing required property: basedir"/>
+
+ <echo message="Compile classpath: ${classpath.full.compile}"/>
+ <echo message="Test classpath: ${classpath.full.test}"/>
+ </target>
+
+ <!--
+ | LIFECYCLE: Clean
+ |-->
+
+ <target name="clean">
+ <delete dir="${build.directory}"/>
+ </target>
+
+ <!--
+ | LIFECYCLE: jar
+ |
+ | This mimics the default Maven build life-cycle: http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
+ |-->
+
+ <target name="process-resources" depends="init" if="available.resources">
+ <mkdir dir="${build.outputDirectory}"/>
+ <copy todir="${build.outputDirectory}">
+ <fileset dir="src/main/resources"/>
+ </copy>
+ </target>
+
+ <target name="compile" depends="process-resources">
+ <mkdir dir="${build.outputDirectory}"/>
+ <mkdir dir="${build.directory}/generated-sources"/>
+ <javac
+ destdir="${build.outputDirectory}"
+ classpath="${classpath.compile}"
+ nowarn="true"
+ source="1.5" target="1.5"
+ debug="on">
+ <src path="${build.sourceDirectory}"/>
+ <src path="${build.directory}/generated-sources"/>
+ </javac>
+ </target>
+
+ <target name="process-test-resources" depends="compile" unless="maven.test.skip">
+ <mkdir dir="${build.testOutputDirectory}"/>
+ <copy todir="${build.testOutputDirectory}">
+ <fileset dir="src/test/resources"/>
+ </copy>
+ </target>
+
+ <target name="test-compile" depends="process-test-resources" unless="maven.test.skip">
+ <mkdir dir="${build.testOutputDirectory}"/>
+ <javac
+ destdir="${build.testOutputDirectory}"
+ classpath="${classpath.full.test}"
+ nowarn="true"
+ source="1.5" target="1.5"
+ debug="on">
+ <src path="${build.testSourceDirectory}"/>
+ </javac>
+ </target>
+
+ <target name="test" depends="test-compile" unless="maven.test.skip">
+ <mkdir dir="${build.directory}/test-output"/>
+ <junit printsummary="yes" haltonfailure="no"> <!-- fork="yes" forkmode="once" -->
+ <sysproperty key="basedir" value="${basedir}"/>
+ <classpath>
+ <pathelement path="${classpath.full.test}"/>
+ </classpath>
+
+ <formatter type="plain"/>
+ <batchtest todir="${build.directory}/test-output">
+ <fileset dir="${build.testSourceDirectory}">
+ <include name="**/*Test.java"/>
+ <exclude name="**/Abstract*"/>
+ <exclude name="${maven.test.exclude}"/>
+ </fileset>
+ </batchtest>
+ </junit>
+ </target>
+
+ <target name="package" depends="test">
+<!--
+ <delete file="${jar}"/>
+
+ <mkdir dir="${build.directory}/META-INF/maven/org.codehaus.modello/modello-core" />
+ <copy file="./modello-core/pom.xml" todir="${build.directory}/META-INF/maven/org.codehaus.modello/modello-core" />
+-->
+ <jar jarfile="${build.directory}/${artifactId}-${version}.jar"
+ basedir="${build.outputDirectory}"/>
+ </target>
+
+ <!--
+ | Javadoc
+ |-->
+
+ <target name="javadoc">
+ <mkdir dir="${javadoc.dir}"/>
+ <javadoc
+ packagenames="org.codehaus.*"
+ sourcepath="${build.sourceDirectory}"
+ destdir="${javadoc.dir}"
+ author="true"
+ version="true"
+ windowtitle="${package} API"
+ doctitle="${package} - ${version}"
+ classpath="${classpath.full.compile}" >
+ </javadoc>
+ </target>
+</project>
diff --git a/debian/rules b/debian/rules
index 94e2a85..446f0ab 100755
--- a/debian/rules
+++ b/debian/rules
@@ -6,18 +6,21 @@ include /usr/share/cdbs/1/class/ant.mk
PACKAGE := $(shell dpkg-parsechangelog | egrep '^Source:' | cut -f2 -d' ')
VERSION := $(shell dpkg-parsechangelog | egrep '^Version:' | sed "s,Version: \(.*\)-.*,\1,g")
JAVA_HOME := /usr/lib/jvm/default-java
-DEB_JARS := ant-nodeps junit
+DEB_JARS := commons-cli maven2 plexus-classworlds plexus-utils
DEB_ANT_BUILD_TARGET := package javadoc
DEB_ANT_BUILDFILE := debian/build.xml
DEB_ANT_ARGS := -Dversion=$(VERSION)
API_DOCS := build/api
+MODULES := component-metadata container-default
get-orig-source:
uscan --force-download --rename
binary-post-install/lib$(PACKAGE)-java::
- dh_install -plib$(PACKAGE)-java build/$(PACKAGE)-$(VERSION).jar usr/share/java
- dh_link -plib$(PACKAGE)-java usr/share/java/$(PACKAGE)-$(VERSION).jar usr/share/java/$(PACKAGE).jar;
+ for MODULE in $(MODULES); do \
+ dh_install -plib$(PACKAGE)-java plexus-$$MODULE/build/plexus-$$MODULE-$(VERSION).jar usr/share/java; \
+ dh_link -plib$(PACKAGE)-java usr/share/java/plexus-$$MODULE-$(VERSION).jar usr/share/java/plexus-$$MODULE.jar; \
+ done
binary-post-install/lib$(PACKAGE)-java-doc::
dh_install -plib$(PACKAGE)-java-doc $(API_DOCS) usr/share/doc/lib$(PACKAGE)-java
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/plexus-containers.git
More information about the pkg-java-commits
mailing list