1.
<!-- SVNAnt for access to Subversion -->
<typedef resource="org/tigris/subversion/svnant/svnantlib.xml">
<classpath>
<fileset dir= "${your.path.to.jars}" >
<include name= "*.jar" />
</fileset>
</classpath>
</typedef>
2.
<!-- Query Subversion for meta-information (e.g. revision #) -->
<target name="query.svn" depends="setProps"
unless="eclipse.running">
<svn>
<wcVersion path=".." prefix="svn." />
</svn>
</target>
3.
<!-- This is not set in Eclipse builds to speed things up so we
create a default value here indicating
this. -->
<property name="svn.committed.max" value="unknown eclipse
build" />
4. Note the funny indentation to keep the Properties file contents
clean and aligned?
<!-- Add the revision number, date, and time to the
Properties file -->
<concat destfile="${java.properties.file}" append="true">
build.version=${svn.committed.max}
build.date=${DSTAMP}
build.time=${TSTAMP}
</concat>
On Jun 27, 2007, at 3:22 PM, Ken Anderson wrote:
> Does anyone on the list have a handy way to integrate the
> subversion revision number into a build? I would think/assume that
> it could be integrated into ANT somehow, creating a resource file
> that could be read by the built app. Anyone have something like this?
>
> Thanks,
> Ken
>
>
--Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects
This archive was generated by hypermail 2.0.0 : Wed Jun 27 2007 - 18:31:49 EDT