Hi,
I am using cruise control on Windows XP. We have CVS as our version control
tool. I am using the following four files to achieve build of my code.
1. config.xml (This file is present in cruise control directory and it calls
up the file 'tc-build.xml'.)
2. tc-build.xml (This file is in a directory where we store the checked out
code from the CVS repository. This file performs
the code check-out operation and also calls the file 'build.xml' to perform
code build on the checked out code.)
3. build.xml (This file performs the actual code build. This file is part of
the checked out code.)
4. build.properties (Contains the value of variables present in build.xml.
This file is also part of the checked out code.)
My Problem: I am able to successfully check out the code from CVS repository
but I think that the code build operation is not happening. Somehow the file
'build.xml' is not able to call the file 'build.properties'. I am saying
this because as soon as the build stops, I can notice two directories with
the name "${build.classes.dir}" & "${dist.dir}" created inside directory
'ant' which is definitely not the desired result.
The content of all the files are as stated under:
config.xml --->
-------------------------------------------------
<?xml version="1.0" ?>
<cruisecontrol>
<project name="TCProject">
<bootstrappers>
<currentbuildstatusbootstrapper
file="E:\TC_CC_BuildArea\logs\tc\buildstatus.txt" />
</bootstrappers>
<schedule interval="600">
<ant buildfile="E:\TC_CC_BuildArea\tc-build.xml" target="build" />
</schedule>
<modificationset quietperiod="10">
<cvs
localworkingcopy="E:\TC_CC_BuildArea\CodeCheckOut\TC_Repository_Code\" />
</modificationset>
</project>
</cruisecontrol>
-------------------------------------------------
tc-build.xml --->
-------------------------------------------------
<?xml version="1.0" ?>
<project name="TCBuild" default="build" basedir="CodeCheckOut" >
<target name="build">
<delete dir="TC_Repository_Code" />
<cvs cvsroot="E:\CVS_Repository\"
package="TC_Repository_Code" />
<ant antfile="build.xml"
dir="E:\TC_CC_BuildArea\CodeCheckOut\TC_Repository_Code\ant" target="war" />
</target>
</project>
-------------------------------------------------
build.xml --->
-------------------------------------------------
<project name="Test" default="war" basedir="..">
<property file="ant/build.properties"/>
<target name="help">
<echo>
1. war - This will build the war file for the project.
2. jar - This will create the jar file containing all
application classes files.
3. compile - This will compile the java classes
</echo>
</target>
<!--create directories-->
<target name="init">
<mkdir dir="${build.classes.dir}"/>
<mkdir dir="${dist.dir}"/>
</target>
<!--clean directories-->
<target name="clean">
<deltree dir="${build.dir}"/>
<deltree dir="${dist.dir}"/>
</target>
<!--build war file-->
<target name="war" depends="jar">
<copydir src="${external.libs.dir}" dest="${targetlibdir}"
includes="*.jar"
excludes="servlet-api.jar,mail.jar,activation.jar"/>
<copy file="${jar}" todir="${targetlibdir}"/>
<war warfile="${war}" webxml="web/WEB-INF/web.xml">
<fileset dir="${basedir}/web">
<include name="images/**/*.*" />
<include name="css/**/*.*" />
<include name="js/**/*.*"/>
<include name="jsp/**/*.*"/>
<include name="*.jsp" />
<include name="WEB-INF/**/*.*" />
</fileset>
<fileset dir="${build.dir}/web">
<include name="WEB-INF/**/*.*" />
</fileset>
</war>
</target>
<target name="jar" depends="compile">
<copy file="${src.dir}/com/tc/struts/ApplicationResource.properties"
todir="${build.dir}/web/WEB-INF/classes/com/tc/struts"/>
<jar jarfile="${jar}">
<fileset dir="${build.classes.dir}">
<include name="**/*.*" />
</fileset>
</jar>
<deltree dir="${build.classes.dir}"/>
</target>
<!-- compile files-->
<target name="compile" depends="clean,init">
<javac srcdir="${src.dir}/com"
destdir="${build.classes.dir}"
includes="**/*.*"
debug="on"
deprecation="on"
optimize="off">
<classpath>
<fileset dir="${libs.dir}" includes="**/*.jar"/>
</classpath>
</javac>
</target>
<target name="deploy">
<copy file="${war}" todir="${jboss.deploy.dir}"
overwrite="true"/>
</target>
</project>
-------------------------------------------------
build.properties --->
-------------------------------------------------
appname=GC
src.dir=${basedir}/src/java
build.dir=${basedir}/build
build.classes.dir=${build.dir}/web/WEB-INF/classes
targetlibdir=${build.dir}/web/WEB-INF/lib
dist.dir=${basedir}/dist
libs.dir=${basedir}/lib
external.libs.dir=${libs.dir}/external
war =${dist.dir}/gc.war
jar=${dist.dir}/gc.jar
jboss.home.dir=E:\jboss-4.2.2.GA
jboss.deploy.dir=${jboss.home.dir}/server/default/deploy
-------------------------------------------------
Can anyone please guide me?
Regards,
Gaurav