Re: Nested 'composite' elements in, CC-config?
Dan Rollo <[email protected]>
| Newsgroups | gmane.comp.java.cruise-control.user |
|---|---|
| Message-ID | <[email protected]> |
Interesting. I think you have found a problem with <composite>, though
I'm not sure it "should" be fixed - but maybe just better documented.
The <schedule> tag looks at any <builder> tags it contains and "picks"
one (and only one) builder to execute. This "pick" looks at things like
the builders' interval/date etc.
http://cruisecontrol.sourceforge.net/main/configxml.html#schedule
I don't think the <composite> builder does anything special to "expose"
such interval/date attributes of it's child builders (though I'm not
sure it should either for your use case).
Have you tried removing the "wrapper" (outer-most) <composite>, so the
<schedule> tag will just pick one of the inner <composite> builders
using their times? eg:
<schedule>
<composite time="1240">
<ant anthome="${ant.home}" antWorkingDir="${projects}/common"
target="moduletest" keepgoing="true" timeout="600" />
<ant anthome="${ant.home}" antWorkingDir="${projects}/main"
target="moduletest" keepgoing="true" timeout="600" />
</composite>
<composite time="2000">
<ant anthome="${ant.home}" antWorkingDir="${projects}/common"
target="moduletest" keepgoing="true" timeout="600" />
<ant anthome="${ant.home}" antWorkingDir="${projects}/main"
target="moduletest" keepgoing="true" timeout="600" />
</composite>
</schedule>
Dan
Subject: [Cruisecontrol-user] Nested 'composite' elements in
CC-config?
To: <[email protected]>
Message-ID:
<[email protected]>
Content-Type: text/plain; charset="us-ascii"
Hi all,
In a project consisting of several subprojects, I'd like to make the
'moduletest' target with ant in the lunch break and in the evening. I have
come up with the following configuration:
<project name="ModuleTests">
<listeners> ... </listeners>
<modificationset> ... </modificationset>
<schedule>
<composite>
<composite time="1240">
<ant anthome="${ant.home}" antWorkingDir="${projects}/common"
target="moduletest" keepgoing="true" timeout="600" />
<ant anthome="${ant.home}" antWorkingDir="${projects}/main"
target="moduletest" keepgoing="true" timeout="600" />
</composite>
<composite time="2000">
<ant anthome="${ant.home}" antWorkingDir="${projects}/common"
target="moduletest" keepgoing="true" timeout="600" />
<ant anthome="${ant.home}" antWorkingDir="${projects}/main"
target="moduletest" keepgoing="true" timeout="600" />
</composite>
</composite>
</schedule>
</project>
This doesn't quite seem to work, as the indicted times are ignored. The
documentation is not clear about this:
http://cruisecontrol.sourceforge.net/main/configxml.html#composite
Quoting: 'The CompositeBuilder executes a list of builders (any builder,
except <pause>).' Though 'composite' is not mentioned in the potential child
builders.
Are nested 'composite' elements allowed? If not, how can I achieve two timed
builds for one CC-project?
Cheers,
Jeroen van der Vegt
System designer
________________________________
Technolution B.V.
Visit us at: www.technolution.eu
Mailing address: P.O. Box 2013 - 2800 BD Gouda - The Netherlands
Address: Zuidelijk Halfrond 1 - 2801 DD Gouda - The Netherlands
________________________________
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo