<project name="XXXX" basedir=".">
...
</project>
<cruisecontrol>
...
<project name="j2ssh">
<schedule showprogress="true">
<ant uselogger="true" target="clean build"
loggerclassname="proserve.tools.buildmon.BuildMonLogger"
buildfile="jtest-build.xml"
showprogress="true"
antworkingdir="projects/${project.name}"
showantoutput="false"
anthome="${CC_HOME}\apache-ant-1.7.0"
usedebug="false" />
</schedule>
</cruisecontrol>
2.
|
|
It is important to do this because the showantoutput (AntOutputLogger from CruiseControl) option triggers a failure when you use Build Monitor with it.
|
3.
|
Turn ON the showprogress option.
|
|
This option triggers CruiseControl to include antProgressXmlLogger. AntProgressXmlLogger will log the project build status for CruiseControl while BuildMonLogger performs its tasks.
|
|
Note: CruiseControl 2.7.1 and older do not support the showAntOutput attribute. ShowProgress is optional for CruiseControl 2.7.1.
|
4.
|
(Optional) Open and review the cruisecontrol.log file to check Build Monitor output.
|
|
Tip! It is good practice to start your Ant project under your project directory so that any log files can use your project root directory instead of the CruiseControl home directory. Be sure to set the jvmarg node to optional and reflective of how to pass any property options for Build Monitor.
|
1.
|
<eclipse install directory>/plugins/org.apache.ant_<version>/lib
2.
|
Add Build Monitor -logger argument to the target after the AntRunner application:
|
<arg value="-logger" />
<arg value="proserve.tools.buildmon.BuildMonLogger" />
<jvmarg value="-Dbuildmonitor.grs.server=leech" />
<jvmarg value="-Dbuildmonitor.grs.port=32323" />
<jvmarg value="-Dbuildmonitor.attributes=\"ProjectName=samplePDE\"
|
<project name="Build Monitor Example" default="-build.internal">
<target name="-build.internal">
<java jar="C:\Program Files\eclipse-all-in-one-SDK-3.3.0\plugins\org.eclipse.equinox.launcher_1.0.0.v20070606.jar"
fork="true" >
<arg value="-application" />
<arg value="org.eclipse.ant.core.antRunner" />
<arg value="-logger" />
<arg value="proserve.tools.buildmon.BuildMonLogger" />
<arg value="-data"/>
<arg value="C:\Documents and Settings\wes\workspace1"/>
<arg value="-buildfile" />
<arg value="C:\Documents and Settings\wes\workspace1\samplePDE\build.xml"/>
<arg value="clean" />
<arg value="build" />
<jvmarg value="-Dbuilder=C:\Documents and Settings\wes\workspace1\samplePDE" />
<jvmarg value="-Dbuildmonitor.grs.server=leech" />
<jvmarg value="-Dbuildmonitor.grs.port=32323" />
<jvmarg value="-Dbuildmonitor.attributes=\"ProjectName=samplePDE\"" />
</java>
</target>
</project>
(Required) Sets Report Center server name.
|
|
(Required) Sets Report Center server port. The default is set to 32323.
|
|
(Optional) Use to specify an alternate Ant BuildLogger for Build Monitor to use, such as MailLogger. By default, Build Monitor uses org.apache.tools.ant.DefaultLogger.
Users can define their own loggers via typical passing of the -logger option to Ant, which is why Build Monitor supports loggers aside from its own.
By adding this property to the Ant command line, Build Monitor loads the specified logger and uses it rather than the default logger; for example:
buildmonitor.alternatelogger=org.apache.tools.ant.listener.MailLogger <with other options for MailLogger>
|
|
(Optional) Sets Concerto Report Center user attributes. The format should be as follows:
buildmonitor.attributes:ProjectName:buildmon,ver-sion:1.1
buildmonitor.attributes:TestAttribute:test
|
|
(Optional) Name of the compile task. The javac Ant edition begins logging compile information during the task that is matched to the compiler.
|
|
(Optional) If set to true, "Nightly" is added as an attribute to the Test Group Properties Filter in Concerto Report Center.
If left blank or set to false, it is not included as an attribute.
|
|
(Optional) Name of the project, which is used for the Concerto Report Center project attribute.
If property is not defined, Build Monitor will pull the value from Ant’s ${ant.project.name} property setting.
|
|
(Optional) Root path of the project.
If the property is not defined, Build Monitor will pull the value from Ant’s ${basedir} property setting.
|
|
This command is only useful for debugging Build Monitor issues. It provides more verbose output to the console so that you can see what is going on when Build Monitor is executed.
|
|
(Optional) Set this system property if running Eclipse’s JAVAC compiler for javac task. Eclipse’s javac compiler prints warning and error messages in a different format—bypassing eclipse.running=true as the JVM argument (ANT_OPTS is the environment variable for the Ant script).
|
•
|
<?xml version:"1.0"?>
<project name:"master project" basedir:"." default:"do-all">
<property name:"src.dir" value:"."/>
<property name:"buildmonitor.grs.server" value:"leech.parasoft.com"/>
<property name:"buildmonitor.grs.port" value:"32323"/>
<property name:"buildmonitor.verbose" value:"true"/>
<property name:"buildmonitor.compiler" value:"javac"/>
<target name:"clean">
<delete dir:"j2ssh"/>
<delete dir:"jEdit-4.3pre2"/>
<delete dir:"WebApp"/>
</target>
<target name:"shadow">
<exec dir:"${src.dir}" executable:"svn" failonerror:"true">
<arg value:"checkout"/>
<arg
value:"https://svn.parasoft.com/svn/proserve/demo/branches/aep/DummyCode/java/j2ssh/"/>
<arg value:"j2ssh"/>
</exec>
<exec dir:"${src.dir}" executable:"svn" failonerror:"true">
<arg value:"checkout"/>
<arg
value:"https://svn.parasoft.com/svn/proserve/demo/trunk/DummyCode/java/jEdit-4.3pre2/"/>
<arg value:"jEdit-4.3pre2"/>
</exec>
</target>
<target name:"build-all">
<ant antfile:"build.xml" dir:"j2ssh" target:"clean"/>
<ant antfile:"build.xml" dir:"j2ssh" target:"build">
<property name:"buildmonitor.attributes" value:"Test:BMTest,ProjectName:j2ssh"/>
</ant>
<ant antfile:"build.xml" dir:"jEdit-4.3pre2" target:"clean"/>
<ant antfile:"build.xml" dir:"jEdit-4.3pre2" target:"compile">
<property name:"buildmonitor.attributes"
value:"Test:BMTest,ProjectName:jEdit-4.3pre2"/>
</ant>
</target>
<target name:"do-all" depends:"clean,shadow,build-all">
<delete dir:"j2ssh"/>
<delete dir:"jEdit-4.3pre2"/>
</target>
</project>