How to distinguish build/clean and build within ant task

View: New views
3 Messages — Rating Filter:   Alert me  

Parent Message unknown How to distinguish build/clean and build within ant task

by Artur Rataj :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello, I have asked this question on netbeans-users, but got no answer.

I have a java task

       <java classname="..." failonerror="true">
            <classpath>
                <pathelement location="..."/>
            </classpath>
            <arg value="-v" />
            <arg value="-t" />
            ...
        </java>

I would like to include or exclude tags, depending on the main task.

In this task, I would like to include the option -t only for netbeans'
build task, and not for
netbean's clean/build task. If possible, how could I do it?

Best regards,
Artur

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@...
For additional commands, e-mail: user-help@...


AW: How to distinguish build/clean and build within ant task

by Knuplesch, Juergen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

 Hello Artur,

You can achieve this with properties:


       <java classname="..." failonerror="true">
            <classpath>
                <pathelement location="..."/>
            </classpath>
            <arg value="-v" />
            <arg value="${javaarg.t}" />


In your different maintasks (or property file) you do
<property name="javaarg.t" value="-t"/> or
<property name="javaarg.t" value=""/> or

--

Greetings from good old Germany

Jürgen

-----Ursprüngliche Nachricht-----
Von: Artur Rataj [mailto:arturrataj@...]
Gesendet: Freitag, 26. Juni 2009 11:50
An: user@...
Betreff: How to distinguish build/clean and build within ant task

Hello, I have asked this question on netbeans-users, but got no answer.

I have a java task

       <java classname="..." failonerror="true">
            <classpath>
                <pathelement location="..."/>
            </classpath>
            <arg value="-v" />
            <arg value="-t" />
            ...
        </java>

I would like to include or exclude tags, depending on the main task.

In this task, I would like to include the option -t only for netbeans'
build task, and not for
netbean's clean/build task. If possible, how could I do it?

Best regards,
Artur

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@... For additional commands, e-mail: user-help@...


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@...
For additional commands, e-mail: user-help@...


Re: How to distinguish build/clean and build within ant task

by Artur Rataj :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello. I tried this, but for some reason, the properties set in the
clean section appear to be gone when in build section. I do not know
why, perhaps there are multiple instances of ant called in these
Netbeans scripts.

Anyway, I put to the clean section deletion of files generated by the
java task, what gives the same result as omitting the -t option, so
the problem is solved.

Best regards,
Artur

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@...
For additional commands, e-mail: user-help@...