[Japi-cvs] SF.net SVN: japi: [528] common/trunk/commonBuild.xml
Status: Beta
Brought to you by:
christianhujer
|
From: <chr...@us...> - 2007-07-09 21:36:59
|
Revision: 528
http://svn.sourceforge.net/japi/?rev=528&view=rev
Author: christianhujer
Date: 2007-07-09 14:36:57 -0700 (Mon, 09 Jul 2007)
Log Message:
-----------
Sorted items alphabetically. Introduced new all target that should replace compile with most callers.
Modified Paths:
--------------
common/trunk/commonBuild.xml
Modified: common/trunk/commonBuild.xml
===================================================================
--- common/trunk/commonBuild.xml 2007-07-09 21:28:03 UTC (rev 527)
+++ common/trunk/commonBuild.xml 2007-07-09 21:36:57 UTC (rev 528)
@@ -3,14 +3,19 @@
<!--
~ Common build.xml for use in multiple projects.
~
+ ~ Note:
+ ~ Taskdefs and targets are sorted alphabetically.
+ ~ Properties are also sorted alphabetically unless they depend on each other.
+ ~
~ @author <a href="mailto:ch...@ri...">Christian Hujer</a>
-->
+<property file="developer.properties" />
<property file="module.properties" />
-<property file="developer.properties" />
+
+<property name="commonPath" value="common" />
<property name="distName" value="${module.name}-${module.version}" />
<property name="distPath" value="dist/${distName}" />
-<property name="commonPath" value="common" />
<property name="javaversion" value="1.5" />
<path id="class.path">
@@ -18,11 +23,60 @@
<fileset dir="${commonPath}" includes="lib/*.jar" excludes="lib/LICENSE-*.jar" />
</path>
+<taskdef classpath="${commonPath}/antlib/checkstyle-all-4.3.jar" resource="checkstyletask.properties" />
+<taskdef name="freshmeat" classpath="${commonPath}/antlib/antmeat.jar" classname="de.frewert.ant.freshmeat.Announcement" />
<taskdef name="pack200" classpath="${commonPath}/antlib/Pack200Task.jar" classname="com.sun.tools.apache.ant.pack200.Pack200Task" />
-<taskdef name="freshmeat" classpath="${commonPath}/antlib/antmeat.jar" classname="de.frewert.ant.freshmeat.Announcement" />
-<taskdef classpath="${commonPath}/antlib/checkstyle-all-4.3.jar" resource="checkstyletask.properties" />
+<!-- targets are sorted alphabetically. -->
+
<target
+ name = "all"
+ description = "incrementally executes all standard build targets."
+ depends = "compile, checkstyle, test"
+/>
+
+<target
+ name = "announce"
+ description = "announce new version on freshmeat.net"
+>
+ <echo>Announcing. Press return to start announcing this release at FreshMeat.</echo>
+ <input />
+ <echo><![CDATA[
+ <freshmeat
+ username = "${user.freshmeat.username}"
+ password = "${user.freshmeat.password}"
+ >
+ <printlicenses/>
+ <printreleasefoci/>
+ <publish
+ projectname = "japi"
+ branchname = "${module.name}"
+ version = "${module.version}"
+ focus = "${update.focus}"
+ >
+ <changes file="LatestNews" />
+ <urlblock
+ homepage = "http://japi.sourceforge.net/"
+ cvs = "http://cvs.sourceforge.net/viewcvs.py/japi/"
+ mailinglist = "http://sourceforge.net/mailarchive/forum.php?forum=japi-users"
+ tgz = "http://prdownloads.sourceforge.net/japi/${distName}.src.tar.gz?download"
+ bz2 = "http://prdownloads.sourceforge.net/japi/${distName}.src.tar.bz2?download"
+ zip = "http://prdownloads.sourceforge.net/japi/${distName}.src.zip?download"
+ />
+ </publish>
+ </freshmeat>
+ ]]></echo>
+</target>
+
+<target name="checkstyle" description="Runs checkstyle over the source code.">
+ <checkstyle
+ config="${commonPath}/sun_checks.xml"
+ >
+ <fileset dir="src" includes="**/*.java,**/*.properties" />
+ </checkstyle>
+</target>
+
+<target
name = "clean"
description = "Cleans Sandbox"
>
@@ -54,56 +108,92 @@
</copy>
</target>
-<target name="checkstyle" description="Runs checkstyle over the source code.">
- <checkstyle
- config="${commonPath}/sun_checks.xml"
- >
- <fileset dir="src" includes="**/*.java,**/*.properties" />
- </checkstyle>
+<target
+ name = "dist"
+ description = "Creates and packs distribution archives."
+ depends = "clean, compile, checkstyle, test, doc"
+>
+ <delete dir="dist" />
+ <mkdir dir="dist" />
+ <parallel>
+ <tar tarfile="${distPath}.src.tar" longfile="gnu">
+ <tarfileset dir="." prefix="${module.name}-${module.version}">
+ <include name="src/**" />
+ <include name="common/**" />
+ <include name="devlib/**" />
+ <include name="lib/**" />
+ <include name="*.iml,build.xml,module.properties" />
+ <include name="CHANGES,COPYING,CREDITS,INSTALL,LICENSE,MAINTAINERS,NEWS,README" />
+ <!-- TODO -->
+ </tarfileset>
+ </tar>
+ <zip destfile="${distPath}.src.zip">
+ <zipfileset dir="." prefix="${module.name}-${module.version}">
+ <include name="src/**" />
+ <include name="common/**" />
+ <include name="devlib/**" />
+ <include name="lib/**" />
+ <include name="*.iml,build.xml,module.properties" />
+ <include name="CHANGES,COPYING,CREDITS,INSTALL,LICENSE,MAINTAINERS,NEWS,README" />
+ <!-- TODO -->
+ </zipfileset>
+ </zip>
+ <jar destfile="${distPath}.src.jar">
+ <zipfileset dir="." prefix="${module.name}-${module.version}">
+ <include name="src/**" />
+ <include name="common/**" />
+ <include name="devlib/**" />
+ <include name="lib/**" />
+ <include name="*.iml,build.xml,module.properties" />
+ <include name="CHANGES,COPYING,CREDITS,INSTALL,LICENSE,MAINTAINERS,NEWS,README" />
+ <!-- TODO -->
+ </zipfileset>
+ </jar>
+ <jar destfile="${distPath}.jar">
+ <zipfileset dir="classes/production/${module.shortname}" />
+ <manifest>
+ <attribute name="Implementation-Title" value="${module.name}" />
+ <attribute name="Implementation-Vendor" value="Christian Hujer + the JAPI Developers" />
+ <attribute name="Implementation-Version" value="${module.version}" />
+ <attribute name="Implementation-URL" value="http://sourceforge.net/projects/japi/" />
+ </manifest>
+ </jar>
+ <tar tarfile="${distPath}.doc.tar" longfile="gnu">
+ <tarfileset dir="." prefix="${module.name}-${module.version}">
+ <include name="docs/**" />
+ </tarfileset>
+ </tar>
+ <zip destfile="${distPath}.doc.zip">
+ <zipfileset dir="." prefix="${module.name}-${module.version}">
+ <include name="docs/**" />
+ </zipfileset>
+ </zip>
+ <jar destfile="${distPath}.doc.jar">
+ <zipfileset dir="." prefix="${module.name}-${module.version}">
+ <include name="docs/**" />
+ </zipfileset>
+ </jar>
+ </parallel>
+ <parallel>
+ <gzip src="${distPath}.src.tar" destfile="${distPath}.src.tar.gz" />
+ <bzip2 src="${distPath}.src.tar" destfile="${distPath}.src.tar.bz2" />
+ <gzip src="${distPath}.doc.tar" destfile="${distPath}.doc.tar.gz" />
+ <bzip2 src="${distPath}.doc.tar" destfile="${distPath}.doc.tar.bz2" />
+ <pack200
+ src="${distPath}.jar"
+ destfile="${distPath}.pack.gz"
+ gzipoutput="true"
+ stripdebug="true"
+ effort="9"
+ keepfileorder="false"
+ modificationtime="latest"
+ deflatehint="false"
+ />
+ </parallel>
+ <delete file="${distPath}.src.tar" />
+ <delete file="${distPath}.doc.tar" />
</target>
-<target name="test" description="Performs JUnit tests." depends="compile">
- <mkdir dir="classes/test/${module.shortname}" />
- <mkdir dir="docs/test" />
- <javac
- srcdir="src"
- destdir="classes/test/${module.shortname}"
- encoding="utf-8"
- source="${javaversion}"
- target="${javaversion}"
- debug="yes"
- >
- <classpath refid="class.path" />
- <classpath location="classes/production/${module.shortname}" />
- <include name="test/**/*.java" />
- <exclude name="**/package-info.java" />
- </javac>
- <copy
- todir="classes/test/${module.shortname}"
- >
- <fileset dir="src" includes="test/**/*.properties" />
- </copy>
- <junit printsummary="yes" haltonfailure="yes">
- <classpath refid="class.path" />
- <classpath location="classes/production/${module.shortname}" />
- <classpath location="classes/test/${module.shortname}" />
- <formatter type="plain" />
- <formatter type="xml" />
- <batchtest todir="docs/test">
- <fileset dir="src">
- <include name="test/**/*Test.java" />
- <exclude name="test/**/Abstract*Test.java" />
- </fileset>
- </batchtest>
- </junit>
- <junitreport todir="docs/test">
- <fileset dir="docs/test">
- <include name="TEST-*.xml" />
- </fileset>
- <report format="frames" todir="docs/test" />
- </junitreport>
-</target>
-
<target
name = "doc"
description = "Creates public API documentation"
@@ -207,121 +297,44 @@
</javadoc>
</target>
-<target
- name = "dist"
- description = "Creates and packs distribution archives."
- depends = "clean, compile, doc, checkstyle, test"
->
- <delete dir="dist" />
- <mkdir dir="dist" />
- <parallel>
- <tar tarfile="${distPath}.src.tar" longfile="gnu">
- <tarfileset dir="." prefix="${module.name}-${module.version}">
- <include name="src/**" />
- <include name="common/**" />
- <include name="devlib/**" />
- <include name="lib/**" />
- <include name="*.iml,build.xml,module.properties" />
- <include name="CHANGES,COPYING,CREDITS,INSTALL,LICENSE,MAINTAINERS,NEWS,README" />
- <!-- TODO -->
- </tarfileset>
- </tar>
- <zip destfile="${distPath}.src.zip">
- <zipfileset dir="." prefix="${module.name}-${module.version}">
- <include name="src/**" />
- <include name="common/**" />
- <include name="devlib/**" />
- <include name="lib/**" />
- <include name="*.iml,build.xml,module.properties" />
- <include name="CHANGES,COPYING,CREDITS,INSTALL,LICENSE,MAINTAINERS,NEWS,README" />
- <!-- TODO -->
- </zipfileset>
- </zip>
- <jar destfile="${distPath}.src.jar">
- <zipfileset dir="." prefix="${module.name}-${module.version}">
- <include name="src/**" />
- <include name="common/**" />
- <include name="devlib/**" />
- <include name="lib/**" />
- <include name="*.iml,build.xml,module.properties" />
- <include name="CHANGES,COPYING,CREDITS,INSTALL,LICENSE,MAINTAINERS,NEWS,README" />
- <!-- TODO -->
- </zipfileset>
- </jar>
- <jar destfile="${distPath}.jar">
- <zipfileset dir="classes/production/${module.shortname}" />
- <manifest>
- <attribute name="Implementation-Title" value="${module.name}" />
- <attribute name="Implementation-Vendor" value="Christian Hujer + the JAPI Developers" />
- <attribute name="Implementation-Version" value="${module.version}" />
- <attribute name="Implementation-URL" value="http://sourceforge.net/projects/japi/" />
- </manifest>
- </jar>
- <tar tarfile="${distPath}.doc.tar" longfile="gnu">
- <tarfileset dir="." prefix="${module.name}-${module.version}">
- <include name="docs/**" />
- </tarfileset>
- </tar>
- <zip destfile="${distPath}.doc.zip">
- <zipfileset dir="." prefix="${module.name}-${module.version}">
- <include name="docs/**" />
- </zipfileset>
- </zip>
- <jar destfile="${distPath}.doc.jar">
- <zipfileset dir="." prefix="${module.name}-${module.version}">
- <include name="docs/**" />
- </zipfileset>
- </jar>
- </parallel>
- <parallel>
- <gzip src="${distPath}.src.tar" destfile="${distPath}.src.tar.gz" />
- <bzip2 src="${distPath}.src.tar" destfile="${distPath}.src.tar.bz2" />
- <gzip src="${distPath}.doc.tar" destfile="${distPath}.doc.tar.gz" />
- <bzip2 src="${distPath}.doc.tar" destfile="${distPath}.doc.tar.bz2" />
- <pack200
- src="${distPath}.jar"
- destfile="${distPath}.pack.gz"
- gzipoutput="true"
- stripdebug="true"
- effort="9"
- keepfileorder="false"
- modificationtime="latest"
- deflatehint="false"
- />
- </parallel>
- <delete file="${distPath}.src.tar" />
- <delete file="${distPath}.doc.tar" />
-</target>
-
-<target
- name = "announce"
- description = "announce new version on freshmeat.net"
->
- <echo>Announcing. Press return to start announcing this release at FreshMeat.</echo>
- <input />
- <echo><![CDATA[
- <freshmeat
- username = "${user.freshmeat.username}"
- password = "${user.freshmeat.password}"
+<target name="test" description="Performs JUnit tests." depends="compile">
+ <mkdir dir="classes/test/${module.shortname}" />
+ <mkdir dir="docs/test" />
+ <javac
+ srcdir="src"
+ destdir="classes/test/${module.shortname}"
+ encoding="utf-8"
+ source="${javaversion}"
+ target="${javaversion}"
+ debug="yes"
>
- <printlicenses/>
- <printreleasefoci/>
- <publish
- projectname = "japi"
- branchname = "${module.name}"
- version = "${module.version}"
- focus = "${update.focus}"
- >
- <changes file="LatestNews" />
- <urlblock
- homepage = "http://japi.sourceforge.net/"
- cvs = "http://cvs.sourceforge.net/viewcvs.py/japi/"
- mailinglist = "http://sourceforge.net/mailarchive/forum.php?forum=japi-users"
- tgz = "http://prdownloads.sourceforge.net/japi/${distName}.src.tar.gz?download"
- bz2 = "http://prdownloads.sourceforge.net/japi/${distName}.src.tar.bz2?download"
- zip = "http://prdownloads.sourceforge.net/japi/${distName}.src.zip?download"
- />
- </publish>
- </freshmeat>
- ]]></echo>
+ <classpath refid="class.path" />
+ <classpath location="classes/production/${module.shortname}" />
+ <include name="test/**/*.java" />
+ <exclude name="**/package-info.java" />
+ </javac>
+ <copy
+ todir="classes/test/${module.shortname}"
+ >
+ <fileset dir="src" includes="test/**/*.properties" />
+ </copy>
+ <junit printsummary="yes" haltonfailure="yes">
+ <classpath refid="class.path" />
+ <classpath location="classes/production/${module.shortname}" />
+ <classpath location="classes/test/${module.shortname}" />
+ <formatter type="plain" />
+ <formatter type="xml" />
+ <batchtest todir="docs/test">
+ <fileset dir="src">
+ <include name="test/**/*Test.java" />
+ <exclude name="test/**/Abstract*Test.java" />
+ </fileset>
+ </batchtest>
+ </junit>
+ <junitreport todir="docs/test">
+ <fileset dir="docs/test">
+ <include name="TEST-*.xml" />
+ </fileset>
+ <report format="frames" todir="docs/test" />
+ </junitreport>
</target>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|