ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rubun Tang <rt...@algorithmics.com>
Subject cruisecontrol with the script task in ant
Date Mon, 28 Jan 2002 22:55:59 GMT
Hi,

First of all, I apologize for my cross-posting as I'm not certain which
particulart will this problem falls into.

I'm having problem using cruisecontrol (1.2.1a) with the script task in Ant
(1.4.1). When building with ant alone, my build.xmls run fine. But when
running the build through cruisecontrol, it complains me with the following
message:

$ ./cruiseControl.bat
java -cp
c:\cruisecontrol1.2.1a\cruisecontrol.jar;c:\j2sdk1.4.0-rc\lib\tools.jar;c:\j
akarta-ant-1.4.
1\lib\algoant1.0.3.jar;c:\jakarta-ant-1.4.1\lib\js.jar;c:\jakarta-ant-1.4.1\
lib\bsf.jar;c:\cruisecon
trol1.2.1a\lib\ant.jar;c:\cruisecontrol1.2.1a\lib\xerces.jar;c:\cruisecontro
l1.2.1a\lib\mail.jar;c:\
cruisecontrol1.2.1a\lib\optional.jar;c:\cruisecontrol1.2.1a\lib\junit.jar;c:
\cruisecontrol1.2.1a\lib
\activation.jar;. net.sourceforge.cruisecontrol.MasterBuild
[masterbuild] ***** Starting automated build process *****

Reading build information from : c:\safari\buildcycleinfo
[masterbuild] ***** Starting Build Cycle
[masterbuild] ***** Label: test.2
[masterbuild] ***** Last Good Build: 20020121170220
[masterbuild]

[masterbuild] Opening build file: build.xml
[masterbuild] Using clean target: cleanbuild

clean:

subbuild:

clean:

BUILD FAILED

java.lang.RuntimeException: Mismatch - popped element = [task: null]
finished task element = [target
: null]
        at org.apache.tools.ant.XmlLogger.targetFinished(XmlLogger.java:181)
        at org.apache.tools.ant.Project.fireTargetFinished(Project.java:952)
        at org.apache.tools.ant.Target.performTasks(Target.java:186)
        at org.apache.tools.ant.Project.executeTarget(Project.java:601)
        at
net.sourceforge.cruisecontrol.BuildRunner.runBuild(BuildRunner.java:118)
        at
net.sourceforge.cruisecontrol.MasterBuild.performBuild(MasterBuild.java:206)
        at
net.sourceforge.cruisecontrol.MasterBuild.execute(MasterBuild.java:165)
        at
net.sourceforge.cruisecontrol.MasterBuild.main(MasterBuild.java:91)

Total time: 2 seconds
[masterbuild] The specified Ant target did not result in a ModificationSet
task being called.
[masterbuild] Without a ModificationSet task, CruiseControl can not work
correctly
No ModificationSet task invoked
        at
net.sourceforge.cruisecontrol.MasterBuild.checkModificationSetInvoked(Master
Build.java:254)
        at
net.sourceforge.cruisecontrol.MasterBuild.performBuild(MasterBuild.java:210)
        at
net.sourceforge.cruisecontrol.MasterBuild.execute(MasterBuild.java:165)
        at
net.sourceforge.cruisecontrol.MasterBuild.main(MasterBuild.java:91)

I have a 2-level building structure, with a master build.xml at the top
level calling the build.xmls in the 2nd level. The script that I use in the
top level build.xml is:

<target name="subbuild">
		<script language="javascript"><![CDATA[
      	var moduleNames=new Array("helper","jtas","name","rg", "ctrl",
"octl", "tas","tr");
      var i=0;
      for(i=0; i<moduleNames.length; i++) {
      

          buildIt = safari.createTask('ant');
          subbuild.addTask(buildIt);
          buildIt.setAntfile("build.xml");
          buildIt.setDir(new java.io.File(safari.getProperty("basedir") +
"/src/" + moduleNames[i]));
          buildIt.setTarget(safari.getUserProperty("script.target"));
          buildIt.setInheritAll(false);
      }
  ]]></script>
</target>

Everytime I want to do something with the 2nd level build.xml, I set the
script.target to that action. For example, if I want to do clean, I will go:

	<target name="clean">
		<antcall target="subbuild">
			<param name="script.target" value="clean"></param>
		</antcall>
     </target>

As I've mentioned above, I have no problem when doing "ant clean", but I'm
having trouble starting it from cruisecontrol. I've made sure that they were
both using the same ant.jar.

I appreciate any helps.


Rubun Tang
Associate Software Engineer
Algorithmics Inc.
____________________
rtang@algorithmics.com
416.217.4460


Mime
View raw message