4 Jul 13:31
[groovy-dev] ant.inport from groovy?
From: Chris Miles <chris@...>
Subject: [groovy-dev] ant.inport from groovy?
Newsgroups: gmane.comp.lang.groovy.devel
Date: 2008-07-04 11:35:02 GMT
Subject: [groovy-dev] ant.inport from groovy?
Newsgroups: gmane.comp.lang.groovy.devel
Date: 2008-07-04 11:35:02 GMT
Hi - I want to
invoke a couple of Ant targets before running my gant stuff.
I can include my
common ant stuff with
ant.'import'
( file : 'buildSWFcommon.xml' )
but when I
try
target ('try13' : ''
) {
depends (
'init' )
// stuff
using pre-defined properties and targets
...
}
(init is defined in
buildSWFcommon.xml) I get
Target `init'
does not exist in this project.
Using -d to gant I
find that gant is looking for init in build.xml - which is
strange.
Can I invoke the
buildSWFcommon.xml target 'init' ?
Chris
This is caused by the lack of integration between Ant projects and Gant
scripts, the AntFile mechanism just gives access to the targets not to
the processing of the targets. Getting this right deserves proper
thought and not a quick hack, hence my proposal for it being a Gant
1.5.0 thing.
> In the file brought in init depends on -macrodef.
> <target name="init" depends="-macrodef, local.properties">
>
> If I specify depends ( ['init'] ) I get
> Could not create task or type of type: read.build.properties.
> 'read.build.properties' is a macrodef defined in target '-macrodef'.
>
> If I specify
> depends ( ['-macrodef', 'init'] )
> my job processes as required.
>
> This seems a bit of a drawback.
I agree, but for now a necessity I'm afraid. If you fancy putting up a
JIRA for this, then there is no chance the problem will get forgotten.
RSS Feed