summaryrefslogtreecommitdiff
path: root/qpid/java/module.xml
diff options
context:
space:
mode:
authorRobert Gemmell <robbie@apache.org>2011-02-07 22:17:00 +0000
committerRobert Gemmell <robbie@apache.org>2011-02-07 22:17:00 +0000
commit527c6d224ef3facb92c1ecb15cc02fff69d1bf7d (patch)
tree539a136f008b8d388384015f7c49b76ede29628f /qpid/java/module.xml
parenteb8e7cf77d382f4233d01cd6c4f96acb3c68f390 (diff)
downloadqpid-python-527c6d224ef3facb92c1ecb15cc02fff69d1bf7d.tar.gz
QPID-1916: updates to allow creation of maven artifacts for client+common modules during the release process
Applied patches from Emmanuel Bourg <ebourg@apache.org> git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1068178 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/module.xml')
-rw-r--r--qpid/java/module.xml44
1 files changed, 38 insertions, 6 deletions
diff --git a/qpid/java/module.xml b/qpid/java/module.xml
index e05fdf0f14..474a1f1937 100644
--- a/qpid/java/module.xml
+++ b/qpid/java/module.xml
@@ -18,10 +18,15 @@
- under the License.
-
-->
-<project name="module">
+<project name="module" xmlns:artifact="antlib:org.apache.maven.artifact.ant">
<import file="common.xml"/>
+ <path id="maven-ant-tasks.classpath" path="${project.root}/lib/maven-ant-tasks-2.1.1.jar" />
+ <typedef resource="org/apache/maven/artifact/ant/antlib.xml"
+ uri="antlib:org.apache.maven.artifact.ant"
+ classpathref="maven-ant-tasks.classpath" />
+
<map property="module" value="${basedir}" split="${path.separator}">
<globmapper from="${project.root}${file.separator}*" to="*"/>
</map>
@@ -74,6 +79,9 @@
<available property="module.etc.exists" file="${module.etc}"/>
<available property="module.bin.exists" file="${module.bin}"/>
+ <property name="module.source.jar"
+ location="${build.lib}/${project.name}-${module.name}-${project.version}-sources.jar"/>
+
<!-- module.depends and module.test.depends are supplied by the importing file -->
<property name="module.depends" value=""/>
<property name="module.test.depends" value=""/>
@@ -209,11 +217,11 @@
<target name="pom" depends="prepare" if="module.genpom">
<jython path="${mllib.dir}">
<args>
- <arg line="${project.root}/genpom"/>
- <arg line="-s ${project.root}/lib/poms"/>
- <arg line="-o ${build}/${module.name}.pom"/>
+ <arg line='"${project.root}/genpom"'/>
+ <arg line='-s "${project.root}/lib/poms"'/>
+ <arg line='-o "${build}/qpid-${module.name}.pom"'/>
<arg line="-g org.apache.qpid"/>
- <arg line="-a ${module.name}"/>
+ <arg line="-a qpid-${module.name}"/>
<arg line="-v ${project.version}"/>
<arg line="${module.genpom.args}"/>
<arg line="${module.libs}"/>
@@ -221,6 +229,19 @@
</jython>
</target>
+ <target name="release-mvn" depends="pom" if="module.genpom" description="Install the artifacts into the local repository and prepare the release">
+ <antcall target="build"/>
+
+ <artifact:pom id="module.pom" file="${build}/qpid-${module.name}.pom"/>
+
+ <artifact:install file="${module.jar}" pomRefId="module.pom"/>
+
+ <artifact:deploy file="${module.jar}" pomRefId="module.pom">
+ <attach file="${module.source.jar}" classifier="sources"/>
+ <remoteRepository url="file://${module.release.base}/maven"/>
+ </artifact:deploy>
+ </target>
+
<target name="precompile"/>
<target name="compile" depends="prepare,precompile" description="compile sources">
@@ -407,7 +428,7 @@
<target name="postbuild" description="run after a build"/>
- <target name="build" depends="jar,jar-tests,libs,copy-bin,copy-etc,postbuild" description="compile and copy resources into build tree"/>
+ <target name="build" depends="jar,jar-tests,jar-sources,libs,copy-bin,copy-etc,postbuild" description="compile and copy resources into build tree"/>
<target name="jar.manifest" depends="compile" if="module.manifest">
<jar destfile="${module.jar}" basedir="${module.classes}" manifest="${module.manifest}"/>
</target>
@@ -424,6 +445,17 @@
<jar destfile="${module.test.jar}" basedir="${module.test.classes}"/>
</target>
+ <target name="jar-sources" depends="prepare" description="create sources jar">
+ <jar destfile="${module.source.jar}">
+ <fileset dir="${project.root}/resources">
+ <include name="LICENSE"/>
+ <include name="NOTICE"/>
+ </fileset>
+ <fileset dir="${module.src}" includes="**/*.java"/>
+ <fileset dir="${module.precompiled}" includes="**/*.java"/>
+ </jar>
+ </target>
+
<target name="libs" description="copy dependencies into build tree">
<copylist todir="${build.lib}" dir="${project.root}" files="${module.libs}"/>
</target>