Author: ataylor
Date: 2010-01-04 11:15:56 -0500 (Mon, 04 Jan 2010)
New Revision: 8706
Modified:
trunk/build-maven.xml
Log:
added maven target for creating repos files
Modified: trunk/build-maven.xml
===================================================================
--- trunk/build-maven.xml 2010-01-04 14:37:05 UTC (rev 8705)
+++ trunk/build-maven.xml 2010-01-04 16:15:56 UTC (rev 8706)
@@ -13,7 +13,7 @@
-->
<project default="upload" name="HornetQ">
- <property name="hornetq.version" value="2.0.0.BETA5"/>
+ <property name="hornetq.version" value="2.0.0.GA"/>
<property name="build.dir" value="build"/>
<property name="jars.dir" value="${build.dir}/jars"/>
@@ -103,4 +103,73 @@
</exec>
</target>
+ <target name="updateMavenRepos">
+ <fail unless="hornetq.distro" message="*** Please set the
hornetq.distro property i.e. -Dhornetq.distro=foo ***"/>
+ <fail unless="hornetq.repos" message="*** Please set the
hornetq.repos property i.e. -Dhornetq.repos=foo ***"/>
+ <property name="src.dir" value="${hornetq.distro}"/>
+ <property name="dest.dir" value="${hornetq.repos}"/>
+
+ <tstamp>
+ <format property="TIMESTAMP" pattern="yyyyMMddhhmmss"
locale="en,UK"/>
+ </tstamp>
+ <antcall target="copyJar">
+ <param name="jarName" value="hornetq-bootstrap"/>
+ <param name="libDir" value="${src.dir}/lib"/>
+ </antcall>
+ <antcall target="copyJar">
+ <param name="jarName" value="hornetq-core"/>
+ <param name="libDir" value="${src.dir}/lib"/>
+ </antcall>
+ <antcall target="copyJar">
+ <param name="jarName"
value="hornetq-jboss-as-integration"/>
+ <param name="libDir" value="${src.dir}/lib"/>
+ </antcall>
+ <antcall target="copyJar">
+ <param name="jarName" value="hornetq-jms"/>
+ <param name="libDir" value="${src.dir}/lib"/>
+ </antcall>
+ <antcall target="copyJar">
+ <param name="jarName" value="hornetq-logging"/>
+ <param name="libDir" value="${src.dir}/lib"/>
+ </antcall>
+ <antcall target="copyJar">
+ <param name="jarName" value="hornetq-transports"/>
+ <param name="libDir" value="${src.dir}/lib"/>
+ </antcall>
+ <mkdir dir="tmpLib"/>
+ <unjar src="${src.dir}/lib/hornetq-ra.rar"
dest="tmpLib"/>
+ <antcall target="copyJar">
+ <param name="jarName" value="hornetq-ra"/>
+ <param name="libDir" value="tmpLib"/>
+ </antcall>
+ <delete dir="tmpLib"/>
+ <antcall target="copyJar">
+ <param name="jarName" value="hornetq-core-client"/>
+ <param name="libDir" value="${src.dir}/client"/>
+ </antcall>
+ <antcall target="copyJar">
+ <param name="jarName" value="hornetq-jms-client"/>
+ <param name="libDir" value="${src.dir}/client"/>
+ </antcall>
+ </target>
+
+ <target name="copyJar">
+ <mkdir dir="${dest.dir}/${jarName}/${hornetq.version}"/>
+ <echo
file="${dest.dir}/${jarName}/${hornetq.version}/${jarName}-${hornetq.version}.pom"
+ message="<?xml version="1.0"
encoding="UTF-8"?><project>${line.separator}
+ <modelVersion>4.0.0</modelVersion>${line.separator}
+ <groupId>org.hornetq</groupId>${line.separator}
+ <artifactId>hornetq-bootstrap</artifactId>${line.separator}
+
<version>${hornetq.version}</version>${line.separator}</project>"/>
+ <copy file="${libDir}/${jarName}.jar"
tofile="${dest.dir}/${jarName}/${hornetq.version}/${jarName}-${hornetq.version}.jar"/>
+ <checksum
file="${dest.dir}/${jarName}/${hornetq.version}/${jarName}-${hornetq.version}.jar"
algorithm="md5"/>
+ <checksum
file="${dest.dir}/${jarName}/${hornetq.version}/${jarName}-${hornetq.version}.jar"
algorithm="sha1"/>
+ <checksum
file="${dest.dir}/${jarName}/${hornetq.version}/${jarName}-${hornetq.version}.pom"
algorithm="md5"/>
+ <checksum
file="${dest.dir}/${jarName}/${hornetq.version}/${jarName}-${hornetq.version}.pom"
algorithm="sha1"/>
+ <replace file="${dest.dir}/${jarName}/maven-metadata.xml"
token="</versions>" value="
<version>${hornetq.version}</version>${line.separator}
</versions>"/>
+ <replaceregexp flags="g"
file="${dest.dir}/${jarName}/maven-metadata.xml"
match="<lastUpdated>(.+)</lastUpdated>"
replace="<lastUpdated>${TIMESTAMP}</lastUpdated>"/>
+ <checksum file="${dest.dir}/${jarName}/maven-metadata.xml"
algorithm="md5"/>
+ <checksum file="${dest.dir}/${jarName}/maven-metadata.xml"
algorithm="sha1"/>
+ </target>
+
</project>
\ No newline at end of file
Show replies by date