Sorry but how do I invoke the <java> task from within my custom
task? You guys said to use <antcall> but I'm not clear on how to do this
using the programmatic API (as opposed to embedding code in the build.xml
file).

Thanks,
Gili
-----Original Message-----
From: Rebhan, Gilbert [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 09, 2006 2:32 AM
To: Ant Users List
Subject: RE: Custom Task that exports a property


Hi,

beside =
project.setNewProperty() for a really new property

there's also =
project.setProperty() - with that method you can reset/overwrite
an existing property if you need to

btw you can always use such methods with <script> task, you
don't always need a new task, f.e.

<property name="FOO" value="bla" />

    <target name="reset">
            
    <!-- groovy -->
    <groovy>
    ant.project.setProperty("FOO","blabla");
    </groovy>

    <echo>Reset $${FOO} Nr.1 via Groovy >>> ${FOO}</echo>

    <!-- javascript -->
    <script language="javascript">
    <![CDATA[
    // overwrite property
     reset.setProperty("FOO","blablabla");
    // new Property
    project.setNewProperty("MyNewProperty", "foobar");
     ]]>
    </script>

    <echo>Reset $${FOO} Nr.2 via JavaScript >>> ${FOO}</echo>
    <echo>$${MyNewProperty} >>> ${MyNewProperty}  </echo>


Regards, Gilbert
 

-----Original Message-----
From: Tzabari, Gili [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 08, 2006 9:13 PM
To: Ant Users List
Subject: RE: Custom Task that exports a property


        Actually I think I was looking for project.setNewProperty()
which I
just ran into now :) I guess one uses AntCallback for chaining calls?

Thanks,
Gili
-----Original Message-----
From: Chun Ji [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 08, 2006 3:10 PM
To: Ant Users List
Subject: RE: Custom Task that exports a property


google "antcallback"

-cji

-----Original Message-----
From: Tzabari, Gili [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 08, 2006 11:56 AM
To: Ant Users List
Subject: Custom Task that exports a property
Importance: Low


Hi,

        I read the tutorial on how to create new Tasks but I am unsure
how
my custom task can define new properties in its execute() that would
then be
visible to the rest of the Ant script. Also, how can my Ant task invoke
other Ant tasks? If I could invoke <property> from inside my execute()
it
would solve my problem.

Thank you,
Gili

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

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

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


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

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

Reply via email to