views:

75

answers:

1

We have some projects in cruise control, set up roughly like this:

Cruise Control

  <ant antfile="build.xml" dir="A" target="compile" inheritAll="false" />

in A the compile target calls, as a part of its compile, a jar target in B (in "compile")

  <ant antfile="${B.dir}/build.xml" inheritAll="false" target="jar" />
  <javac ... >

So B has a jar task.A builds the jar from B and then uses it in it's compile.

The problem I'm running into is that cruise control seems to confuse the paths. Although the A compile task works directly from ant, when run from cruisecontrol it seems to be trying to find it's own internal libraries based on paths from the B jar settings.

To get this to work in ant I had to call B from A using the inheritAll="false" flag, but neither this nor calling javac with fork seems to resolve the problem.

Possibly related- we're running ant @ version 1.7, the cc server is at ant version 1.6.5, which I can't easily update.

Any hints?

+1  A: 

In your CruiseControl configuration you can specify the anthome or antscript attributes so that you use your version of Ant, so you should be able to get the same behavior from CC that you get at the command-line.

Jeffrey Fredrick
This is a good link. Thanks. However, I'm still stuck, as the anthome/antscript attributes still don't get recognized-do you happen to know if those are new to ant 1.7? if so, then I need to get the ant version fixed. If no, then the cc install is borked. Thanks again for the tip.
Steve B.
Those attributes are for the CruiseControl config.xml, not the Ant build.xml. You use them to tell CC which Ant it should use for the build.
Jeffrey Fredrick