Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 118 lines (83 sloc) 3.96 KB
<?xml version="1.0" encoding="UTF-8"?>
<project name="EventManager" default="compile">
<!-- update build properties -->
<propertyfile file="buildprops/build.properties">
<entry key="build.number" type="int" operation="+" value="1" pattern="00"/>
<entry key="build.date" type="date" pattern="EEEE MMM dd, yyyy" value="now"/>
<entry key="build.time" type="date" pattern="kk:mm:ss" value="now"/>
<entry key="build.timestamp" type="date" pattern="yyyy-MM-dd'T'HH:mm:ss" value="now"/>
<entry key="build.year" type="date" pattern="yyyy" value="now"/>
</propertyfile>
<!-- build properties -->
<property file="buildprops/build.properties"/>
<property file="buildprops/project.properties"/>
<property file="buildprops/unames.properties"/>
<property name="tmpdir" value="${java.io.tmpdir}/${build.projectName}/" />
<target name="runtests" description="Make output directories and run the MXUnit task">
<mkdir dir="${mxunit.output}" />
<taskdef name="mxunittask" classname="org.mxunit.ant.MXUnitAntTask" classpath="${mxunit.jar}"/>
<echo message="Runnig tests"/>
<mxunittask server="${server.host}" port="${server.port}"
defaultrunner="/mxunit/runner/HttpAntRunner.cfc"
verbose="true"
outputdir="testresults"
haltonfailure="true"
haltonerror="false">
<directory runner="${mxunit.httprunner}"
remoteMethod="run"
path="${test.component.path}"
packageName="${test.component.packagename}"
componentPath="${test.component.componentpath}"
recurse="true"
/>
</mxunittask>
</target>
<!--<target name="commit">
<echo level="info">Committing Cfem</echo>
<input message="SVN Commit Comment:" addproperty="commit.comment" defaultvalue="Periodic Commit From Ant Task" />
<taskdef resource="org/tigris/subversion/svnant/svnantlib.xml" classpathref="project.classpath"/>
<svn username="${svn.username}" password="${svn.password}">
<commit message="${commit.comment}" dir="${basedir}" recurse="true" />
</svn>
</target>-->
<target name="deploy">
<mkdir dir="${tmpdir}" />
<echo message="Copy to temp"/>
<copy todir="${tmpdir}">
<fileset dir="${basedir}/templates" includes="framework.properties"/>
<fileset dir="${basedir}/templates" includes="license.txt"/>
</copy>
<echo message="Replacing properties "/>
<replace dir="${tmpdir}">
<replacefilter token="@number" value="${build.number}"/>
<replacefilter token="@projectName" value="${build.projectName}"/>
<replacefilter token="@date" value="${build.date}"/>
<replacefilter token="@projectUrl" value="${build.projectUrl}"/>
<replacefilter token="@projectVersion" value="${build.projectVersion}"/>
<replacefilter token="@authorEmail" value="${build.authorEmail}"/>
<replacefilter token="@author" value="${build.author}"/>
<replacefilter token="@year" value="${build.year}"/>
</replace>
<echo message="Copy files"/>
<copy todir="${basedir}/com/andreacfm/cfem/" overwrite="true">
<fileset dir="${tmpdir}" includes="license.txt"/>
<fileset dir="${tmpdir}" includes="framework.properties"/>
</copy>
<delete dir="${tmpdir}"/>
</target>
<target name="updateDocs">
<mkdir dir="${tmpdir}" />
<echo message="Make docs"/>
<get src="http://localhost/cfeventmanager/colddoc/run.cfm" dest="${tmpdir}/docs_response.txt"/>
<replace dir="${basedir}/docs">
<replacefilter token="@number" value="${build.number}"/>
<replacefilter token="@projectName" value="${build.projectName}"/>
<replacefilter token="@date" value="${build.date}"/>
<replacefilter token="@projectVersion" value="${build.projectVersion}"/>
</replace>
<delete dir="${tmpdir}"/>
</target>
<target
name="compile"
depends="runtests,deploy,updateDocs" />
</project>