> From: Stefan Bodewig [mailto:[EMAIL PROTECTED] 
> 
> On Fri, 13 May 2005, Jose Alberto Fernandez 
> <[EMAIL PROTECTED]> wrote:
> >> From: Stefan Bodewig [mailto:[EMAIL PROTECTED]
> 
> >> 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".
> 

Well, alternatively you could overide "setup":

  <target name="setup" depends="imported.setup,
generate-java-from-idl"/>

Actually, one could argue that generate-java-from-idl is part of the
setup 
for "compile" in this context and hence that is the correct target to
override.

Jose Alberto

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to