ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: [Bug 28444] - Import: Target Handling Bug
Date Fri, 13 May 2005 11:04:00 GMT
On Fri, 13 May 2005, Jose Alberto Fernandez
<jalberto@cellectivity.com> wrote:
>> From: Stefan Bodewig [mailto:bodewig@apache.org] 

>> Another related problem I have is that you can't add 
>> something to the beginning of a target easily.  You can add 
>> someting to the end of "foo" by writing your own "foo" that 
>> depends on "imported.foo", but if you want to add something 
>> at the start your imported build file has to be designed for 
>> it.  Which means pseudo-targets that are used as interception 
>> points only.
>> 
> 
> Cant you write on the importing file:
> 
> <target name="foo" depends="before-foo, imported.foo"/>
> 
> <target name="before-foo">...</foo>

Not if I want to inject stuff between the targets "imported.foo"
depends on and "imported.foo" itself.

imported.xml

,----
| <target name="setup">
|   ...
| </target>
| 
| <target name="compile" depends="setup">
|   <javac .../>
| </target>
`----

build.xml

,----
| <target name="generate-java-from-idl">
|   <idl2java .../>
| </target>
`----

how do I get the build sequence imported.setup,
generate-java-from-idl, compile without modifying imported.xml and
without access to the dependencies of "compile"?

Today I either add depends="setup" to "generate-java-from-idl" and
have to change that whenever the depends list of "compile" changes or
I introduce an empty target to imported.xml, make "compile" depend on
it (as the last target in the list) and the override this empty target
with "generate-java-from-idl".

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message