I've modified the import tag to be able to override targets, and I'm writing the part in which it can call a "super" target, ie the version it's redefining.

I was thinking of something like this:

Suppose this target:

<target name="mytarget" depends="a,b,c">...</target>

in an xsl-like syntax it would be like:

<target name="mytarget">
  <dostuff1/>
  <apply-import/>
  <dostuff2/>
</target>

but I was thinking of reusing antcall and do:

<target name="mytarget">
  <dostuff1/>
  <antcall target="super.mytarget"/>
  <dostuff2/>
</target>


Apart from the fact that a naming rule is good or not, I had to look in CallTarget.java, and I find this:


    public void execute() throws BuildException {

        ...

        callee.setDir(getProject().getBaseDir());
        callee.setAntfile(getProject().getProperty("ant.file"));
        callee.setTarget(subTarget);
        callee.setInheritAll(inheritAll);
        callee.setInheritRefs(inheritRefs);
        callee.execute();
    }

I'm creating a new Project just to run a target?
Why? Is it really necessary?

Can't I just do

 subTarget.execute();

?

--
Nicola Ken Barozzi                   [EMAIL PROTECTED]
            - verba volant, scripta manent -
   (discussions get forgotten, just code remains)
---------------------------------------------------------------------


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



Reply via email to