ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Neta Bar Tal" <NE...@Amdocs.com>
Subject RE: Problem to set property with refid
Date Thu, 03 Jun 2004 10:36:05 GMT

Hi Vinod,
You should list the packages into a file that will hold the property of
src= ${src1} and the ${src2} and then in the attribute of srcdir just
give the root of both packages
And then run it in <for> task of ant-contrib.
It's just an example...:-))

netaB




-----Original Message-----
From: Ivan Ivanov [mailto:rambiusparkisanius@yahoo.com]
Sent: Thursday: June 03: 2004 1:27 PM
To: Ant Users List
Subject: RE: Problem to set property with refid

Hi Vinod,
I am not sure I understand you quite well :))

--- vinod.nayak@iflexsolutions.com wrote:
> Thanks Ivan,
>
> I used the logic 'isset' and my problem is solved.
>
> Tell me, am I correct here.
>
> <javac destdir="${build}"
>          classpath="xyz.jar"
>          debug="on">
>     <src path="${src1}"/>
>     <src path="${src2}"/>
> </javac>
>

Well, I always organize my project so that I nave used <javac> with more
than one <src> attribute. If I have several source dirs, I compile them
with several <javac>, so I never used a snippet like the one above.

> In this task, java source files of ${src1} are compiled first and then

> later from ${src2}.
Not sure what you mean. Are sources from ${src1} compiled first OR are
compiled later?

>I tested it by having a java
> file in ${src2}
> dependent on a java file existing in ${src1} and it  could compile
>successfully.
Well, ant resolve dependencies between classes in a very decent manner,
so it will compile successfully.

>But while compiling the task echoes,
> 'compiling <no of
> files from ${src1}+ no of files from ${src2} java  file to ..' in a 
>single line.
What is the exact message that is echoed. In fact you have turned javac'
debug on, which means that it will show lots of messages - what classes
it loads and which classes it compiles. Try to turn it on if you don't
what to see the message.

>I want to be double sure on what I am
> guessing is right.
>
Can you say once again your guess, please.

Sorry I want't so helpful.

Ivan

> Please help me,
> Vinod.
>
>
> -----Original Message-----
> From: Ivan Ivanov
> [mailto:rambiusparkisanius@yahoo.com]
> Sent: Thursday, June 03, 2004 12:53 PM
> To: Ant Users List
> Subject: RE: Problem to set property with refid
>
> Hi Vinod,
>
> Let's say the property we want to check is called testprop. The check
> can be done in several ways
>
> 1) Pure Ant
> <target name="main" depends="target_A, target_B"/>
>
> <target name="target_A" if="testprop"> ... Do smth here </target>
>
> <target name="target_B" unless="testprop"> ... Do smth here again
> </target>
>
> The point is that target "main" will call both target_A and target_B.
> Then if testprop IS set target_A will be excecuted. If testprop IS NOT

> set target_B will be executed.
>
> 2) Ant + Ant-Contrib
> If you have many conditions to check in this way you may prefer
> ant-contrib [1] <if> task [2]. In our
> case:
> <target name="main">
>     <if>
>         <isset property="testprop">
>         <then>
>             ... Do here the stuff previously done in target_A
>         </then>
>         <else>
>             ... Do here the stuff previously done in target_B
>         </else>
>     </if>
> </target>
>
> Note that <isset> is Ant built-in condition. For more info on
> condition check [3] and [4].
>
> Regards Ivan
>
> [1]http://ant-contrib.sourceforge.net/
> [2]http://ant-contrib.sourceforge.net/tasks/if.html
>
[3]http://ant.apache.org/manual/CoreTasks/condition.html
>
[4]http://ant.apache.org/manual/CoreTasks/conditions.html
>
>
> 
> 	
> __________________________________
> Do you Yahoo!?
> Friends.  Fun.  Try the all-new Yahoo! Messenger.
> http://messenger.yahoo.com/
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
>




	
__________________________________
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/

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



The information contained in this message is proprietary of Amdocs,
protected from disclosure, and may be privileged.
The information is intended to be conveyed only to the designated recipient(s)
of the message. If the reader of this message is not the intended recipient,
you are hereby notified that any dissemination, use, distribution or copying of
this communication is strictly prohibited and may be unlawful.
If you have received this communication in error, please notify us immediately
by replying to the message and deleting it from your computer.
Thank you.

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


Mime
View raw message