| | |
Not able to call build.properties file from build.xml
Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Aug 2008
Posts: 1
Reputation:
Solved Threads: 0
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 --->
-------------------------------------------------
-------------------------------------------------
tc-build.xml --->
-------------------------------------------------
-------------------------------------------------
build.xml --->
-------------------------------------------------
-------------------------------------------------
build.properties --->
-------------------------------------------------
-------------------------------------------------
Can anyone please guide me?
Regards,
Gaurav
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 --->
-------------------------------------------------
Java Syntax (Toggle Plain Text)
<?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 --->
-------------------------------------------------
Java Syntax (Toggle Plain Text)
<?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 --->
-------------------------------------------------
Java Syntax (Toggle Plain Text)
<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 --->
-------------------------------------------------
Java Syntax (Toggle Plain Text)
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
Last edited by Tekmaven; Aug 14th, 2008 at 4:09 pm. Reason: Code tags
![]() |
Similar Threads
- pop ups are back (Viruses, Spyware and other Nasties)
- This is a wierd one! (Windows NT / 2000 / XP)
- Zone Alarm Security Alerts. (Viruses, Spyware and other Nasties)
Other Threads in the Java Forum
- Previous Thread: Help Finishing Inventory Part 6
- Next Thread: java.lang.NoClassDefFoundError
Views: 2100 | Replies: 0
| Thread Tools | Search this Thread |
Tag cloud for Java
6 android api apple applet application arguments array arrays automation binary bluetooth bold byte c++ chat class classes client code component coordinates database datagram doctype draw eclipse educational error event exception file fractal froglogic game givemetehcodez graphics gui helpwithhomework html ide ideas image ingres input integer internet intersect ip j2me java javaexcel javaprojects jmf jni jpanel jtextarea julia linux list loop map method methods mobile netbeans newbie nextline number object oracle pong print problem program programming project recursion recursive scanner screen sell server set size sms socket sort sql string swing test threads time transfer tree user web websites windows





