Updated ant file

This commit is contained in:
Ziver Koc 2016-12-14 16:23:56 +01:00
parent 0cec8a2c3d
commit d79d9a98e6

35
build.xml Normal file → Executable file
View file

@ -7,10 +7,11 @@
<property name="gitRoot" value="." />
<property name="srcDir" value="${gitRoot}/src" />
<property name="libDir" value="${gitRoot}/lib" />
<property name="libDir2" value="${gitRoot}/WebContent/WEB-INF/lib" />
<property name="buildRoot" value="${gitRoot}/build" />
<property name="buildDir" value="${buildRoot}/production" />
<property name="releaseDir" value="${buildRoot}/release" />
<property name="libExpDir" value="${gitRoot}/WebContent/WEB-INF/lib" />
<property name="outputDir" value="${gitRoot}/build" />
<property name="buildDir" value="${outputDir}/production" />
<property name="releaseDir" value="${outputDir}/release" />
<property name="deployPath" value="/var/lib/tomcat7/webapps/Zallery.war" />
<!--define standard arguments for javac-->
<presetdef name="javac">
@ -24,7 +25,7 @@
<fileset dir="${libDir}">
<include name="**/*.jar"/>
</fileset>
<fileset dir="${libDir2}">
<fileset dir="${libExpDir}">
<include name="**/*.jar"/>
</fileset>
<pathelement location="${buildDir}" />
@ -39,11 +40,20 @@
<!--clean all build paths-->
<target name="clean">
<delete includeemptydirs="true" failonerror="false">
<fileset dir="${buildRoot}" includes="**/*"/>
<fileset dir="${outputDir}" includes="**/*"/>
</delete>
</target>
<!--build product code-->
<target name="build">
<mkdir dir="${buildDir}" />
<get src="http://ci.koc.se/jenkins/job/Zutil/lastSuccessfulBuild/artifact/build/release/Zutil.jar" dest="${libExpDir}" verbose="true" usetimestamp="true"/>
<javac target="1.7" srcdir="${srcDir}" destdir="${buildDir}" debug="yes" debugLevel="lines,vars,source">
<classpath refid="classpath.build" />
<include name="**/*.java" />
</javac>
</target>
<target name="package" depends="build">
<war destfile="${releaseDir}/Zallery.war" webxml="WebContent/WEB-INF/web.xml">
<fileset dir="WebContent"/>
@ -53,17 +63,10 @@
</war>
</target>
<target name="build">
<mkdir dir="${buildDir}" />
<get src="http://ci.koc.se/jenkins/job/Zutil/lastSuccessfulBuild/artifact/build/release/Zutil.jar" dest="${libDir2}" verbose="true" usetimestamp="true"/>
<javac target="1.7" srcdir="${srcDir}" destdir="${buildDir}" debug="yes" debugLevel="lines,vars,source">
<classpath refid="classpath.build" />
<include name="**/*.java" />
</javac>
</target>
<target name="deploy" depends="package">
<copy
file="${releaseDir}/Zallery.war"
toFile="${deployPath}" />
</target>
</project>