Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.0-JSR-5
-
Fix Version/s: 1.1-rc-2
-
Component/s: Ant integration
-
Labels:None
-
Environment:Windows and Linux
Java 1.5
Ant 1.6.5
-
Number of attachments :
Description
From the mailing list wrap-up post by Dierk:
<quote>
def ant = new AntBuilder()
ant.ant(antfile:'build.xml'){
target(name:'one')
}
is working but
def ant = new AntBuilder()
ant.ant(antfile:'build.xml'){
target(name:'one')
target(name:'two')
}
is not. The flag 'targetAttributeSet' is set erroneously in org.apache.tools.ant.taskdefs.Ant#addConfiguredTarget.
(possible Ant bug?)
</quote>
(Having looked at the Ant source myself, I can only see targetAttributeSet being set in setTarget, so personally I suspect it's not an Ant bug.)
To find the mailing list thread, search for a subject of "AntBuilder.ant.target not working?" on Feb 23rd/24th 2006. (Web access to mailing list is down right now, hence the lack of URL.)
Issue Links
| This issue is superceded by: | ||||
| GROOVY-3763 | CLONE -Using the Ant task with multiple targets fails |
|
|
|
I don't know when this was fixed, but appears working now.
This groovy script:
def ant = new AntBuilder() ant.ant(antfile: 'GROOVY-1260.xml') { target(name: 'one') target(name: 'two') }with this build file:
produces this output:
one: [echo] 1 two: [echo] 2def ant = new AntBuilder() ant.ant(antfile: 'GROOVY-1260.xml') { target(name: 'one') target(name: 'two') }one: [echo] 1 two: [echo] 2