adammurdoch 02/05/09 00:46:13
Modified: tools/xsl build.xsl
Log:
Make use of Ant 1.5 stuff:
- Get rid of <package> element.
- Generate .tar.gz and .tar.bz2 distribution files.
- Allow <compilePatterns> elements in <unitTests>.
Revision Changes Path
1.12 +23 -17 jakarta-ant-myrmidon/tools/xsl/build.xsl
Index: build.xsl
===================================================================
RCS file: /home/cvs/jakarta-ant-myrmidon/tools/xsl/build.xsl,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- build.xsl 2 May 2002 10:27:36 -0000 1.11
+++ build.xsl 9 May 2002 07:46:13 -0000 1.12
@@ -14,6 +14,8 @@
<property file="../ant.properties"/>
<property file="${{user.home}}/.ant.properties"/>
+ <property name="build.compiler.emacs" value="true"/>
+
<!-- Version info (to give gump a chance to overide it) -->
<property name="version" value="{currentVersion}"/>
@@ -180,6 +182,13 @@
<xsl:choose>
<xsl:when test="unitTest">
+ <patternset id="project.test.patternset">
+ <patternset refid="project.compile.patternset"/>
+ <xsl:for-each select="unitTest/compilePatterns">
+ <xsl:copy-of select="*|@*"/>
+ </xsl:for-each>
+ </patternset>
+
<target name="compile" depends="compile-src,
compile-tests"/>
<target name="fail-no-junit" unless="junit.present">
@@ -199,7 +208,7 @@
<classpath location="${{build.classes}}"/>
<classpath refid="test.class.path"/>
<src location="{unitTest/sourceDirectory}"/>
- <patternset refid="project.compile.patternset"/>
+ <patternset refid="project.test.patternset"/>
</javac>
<!-- copy resources to same location as .class files
-->
@@ -224,7 +233,7 @@
descriptorName="ant-descriptor.xml"
rolesDescriptorName="ant-roles.xml">
<fileset dir="{unitTest/sourceDirectory}">
- <patternset
refid="project.compile.patternset"/>
+ <patternset
refid="project.test.patternset"/>
</fileset>
<classpath refid="xdoclet.class.path"/>
<classpath location="${{build.classes}}"/>
@@ -300,9 +309,10 @@
<javadoc
destdir="${{dist.javadocs}}">
<classpath refid="compile.class.path" />
- <sourcepath refid="project.source.path" />
- <xsl:for-each select="package">
- <package name="{.}.*"/>
+ <xsl:for-each select="build/sourceDirectory">
+ <packageset dir="{.}">
+ <patternset
refid="project.compile.patternset"/>
+ </packageset>
</xsl:for-each>
<doclet
name="com.sun.tools.doclets.standard.Standard">
<param name="-author"/>
@@ -347,29 +357,25 @@
<zipfileset dir="${{dist.dir}}" prefix="{$distname}"/>
</zip>
- <!--
- <tarfileset prefix=""> is not supported by released ant
- but when it is we should enable this across all of the
products
- <tar longfile="gnu"
tarfile="${{dist.base}}/{$distname}-bin.tar">
+ <property name="tarfile"
value="${{dist.base}}/{$distname}-bin.tar"/>
+
+ <tar longfile="gnu" tarfile="${{tarfile}}">
<tarfileset dir="${{dist.dir}}"
username="ant"
prefix="{$distname}"
group="ant"/>
</tar>
- <gzip zipfile="${{dist.base}}/{$distname}-bin.tar.gz"
- src="${{dist.base}}/{$distname}-bin.tar"/>
+ <gzip zipfile="${{tarfile}}.gz" src="${{tarfile}}"/>
- Need to switch this on too
- <bzip2 zipfile="${{dist.base}}/{$distname}-bin.tar.bz2"
- src="{$distname}-bin.tar"/>
+ <bzip2 zipfile="${{tarfile}}.bz2"
+ src="${{tarfile}}"/>
- <delete file="${{dist.base}}/{$distname}-bin.tar"/>
+ <delete file="${{tarfile}}"/>
<checksum fileext=".md5">
- <fileset dir="${{dist.base}}" />
+ <fileset dir="${{dist.base}}" excludes="**/*.md5"/>
</checksum>
- -->
</target>
<!-- Extra targets -->
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>