Show dist.xml syntax highlighted
<project name="dist"
xmlns:core="http://smartfrog.org/build/core"
xmlns:ac="antlib:net.sf.antcontrib"
xmlns:sf="antlib:org.smartfrog.tools.ant"
xmlns:ivy="antlib:fr.jayasoft.ivy.ant"
default="packaged"
>
<description>
All the targets for compiling and distributing things
</description>
<!-- import the core -->
<import file="sftasks.xml"/>
<import file="classpaths.xml"/>
<import file="javadoc-mixin.xml"/>
<import file="m2.xml" />
<!-- new states -->
<target name="ready-to-compile"
depends="init,declare-classpaths,core-tasks">
</target>
<target name="compiled" depends="compile"/>
<!-- override point: here we have already compiled everything
and done the rmic compile -->
<target name="ready-to-package" depends="rmi,generate-version" />
<target name="packaged" depends="package"/>
<target name="ready-to-compile-tests"
depends="packaged,declare-tests.compile.classpath" />
<target name="tests-compiled" depends="compile-tests"/>
<target name="tests-packaged"
depends="package-tests" />
<target name="ready-to-publish-all"
depends="ready-to-publish"/>
<target name="published" depends="ready-to-publish,m2.m2-published,ivy.published" />
<!-- ========================================================== -->
<!-- this is an override point -->
<!-- create the JAR ${target.jar}-->
<!-- ========================================================== -->
<target name="package" depends="jar"
description="create the JAR files">
</target>
<!-- ========================================================== -->
<!-- this is an override point -->
<!-- compile everything, copy useful files over-->
<!-- ========================================================== -->
<target name="compile"
depends="ready-to-compile">
<depend srcdir="${src.dir}"
destdir="${build.classes.dir}"
cache="${build.dir}/depends"
closure="yes"/>
<core:javac
classpathref="compile.classpath"
srcdir="${src.dir}"
destdir="${build.classes.dir}"
/>
<core:copy-useful-files src="${src.dir}" dest="${build.classes.dir}"/>
</target>
<!-- ========================================================== -->
<!-- this is an override point -->
<!-- RMI compile by looking for all remote classes in the
compiled project-->
<!-- ========================================================== -->
<target name="rmi" depends="compiled"
description="create the RMI classes">
<core:rmic
base="${build.classes.dir}"
verify="true"
compiler="${rmic.compiler}"
includes="**/*.class">
<classpath refid="compile.classpath"/>
</core:rmic>
</target>
<!--
logic to create a versioned jar name
-->
<target name="generate-version" depends="init">
<!-- save everything to a file -->
<!-- keep this in sync w/ common.xml's declaration -->
<property name="sf.version.file" location="${build.dir}/version.properties"/>
<propertyfile
file="${sf.version.file}"
comment="This is machine generated. Do Not Edit!">
<entry key="sf.build.date" type="date" value="now"/>
<entry key="sf.build.version" value = "${smartfrog.version}"/>
</propertyfile>
<copy file="${sf.version.file}" todir="${dist.dir}" />
<!-- build the name of our JAR file from the name of the project.
override any of this stuff for alternate naming -->
<property name="jar.prefix" value="sf-" />
<!-- this is the name of the outer project, not common.xml's name -->
<property name="project.name" value="${jar.prefix}${ant.project.name}" />
</target>
<!--
bypass all the self-referential stuff here.
-->
<target name="jar" depends="ready-to-package" >
<core:jar destfile="${target.jar}"
basedir="${build.classes.dir}"
includes="**/*"/>
<echo level="verbose">created package ${target.jar}</echo>
</target>
<target name="compile-tests"
depends="ready-to-compile-tests">
<depend
srcdir="${test.src.dir}"
destdir="${test.classes.dir}"
cache="${build.test.dir}/depends"
closure="yes"/>
<core:javac
srcdir="${test.src.dir}"
destdir="${test.classes.dir}"
classpathref="tests.compile.classpath"
/>
<core:copy-useful-files src="${test.src.dir}" dest="${test.classes.dir}"/>
</target>
<!-- ========================================================== -->
<!-- this is an override point -->
<!-- create the test jar ${test.jar}-->
<!-- ========================================================== -->
<target name="package-tests" depends="ready-to-package-tests"
description="create the JAR file for the tests">
<core:jar destfile="${test.jar}"
basedir="${test.classes.dir}"
includes="**/*"/>
<echo level="verbose">created package ${test.jar}</echo>
</target>
</project>
See more files for this project here