ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Neta Bar Tal" <>
Subject RE: How to create paths that depend on a condition?
Date Sun, 23 May 2004 08:00:13 GMT

Hi Vincent,
I'm doing the opposite I'm starting a property in case the path exists.
Try to do it in opposite way.
Hope it helps...

<for list="${dynamics}" delimiter=" " param="dir">
			<path id="sources.path.@{dir}">
		      		<fileset dir="${env.CCWSCA}/@{dir}">
		      			 <include name="*.java" />
		     	 <property name="sources.@{dir}"
				<available file="${sources.@{dir}}"

			  	<echo message="Nothing to do for @{dir}"
			 	<echo>compiling package:@{dir}</echo>
			   	<javac debug="${env.JAVA_DEBUG}"
destdir="${env.CCWPA}/classes" failonerror="false"
includeantruntime="false" listfiles="no" optimize="on"
		                   <include name="@{dir}/*.java" />
		            	  <classpath path="${classpath}"/>


Neta Bar-Tal

* 972-9-7960521


-----Original Message-----
From: Vincent Massol []
Sent: Saturday: May 22: 2004 12:23 PM
To: 'Ant Users List'
Subject: RE: How to create paths that depend on a condition?

Ok, I've found a solutiob but it looks really ugly:

<dirset dir="${src.test.dir}/share-13-14">
    <filename name="share-13-14"/>
      <selector if="j2ee13.available"/>
      <selector if="j2ee14.available"/>

Any better solution?


> -----Original Message-----
> From: Vincent Massol []
> Sent: 22 May 2004 10:41
> To:
> Subject: How to create paths that depend on a condition?
> Hi,
> I'd like to create a <path> that depends on some property being
> or not. This is for putting inside the <javac> task. I cannot find the

> right combination. Here's what I'd like to do:
>     <javac [...]>
>       <src>
>         <pathelement location="${src.test.dir}/share-12-13-14"/>
> ---> start here
>         <dirset dir="${src.test.dir}/share-13-14">
>           <and>
>             <depth max="0"/>
>             <or>
>               <selector if="j2ee13.available"/>
>               <selector if="j2ee14.available"/>
>             </or>
>           </and>
>         </dirset>
> ---> stop here
> The problem is that in order to use a selector (which has a "if"
> attribute), I need to use direst. However dirset lists all directories

> below a base dir. Hence the reason why I've tried using a max <depth>
> 0.
> When I run this I get a "duplicate class" error:
>     [javac]
> duplicate class: org.apache.cactus.TestAll
>     [javac] public class TestAll
>     [javac]        ^
>     [javac]
> xtension\jetty\T
> duplicate class:
> org.apache.cactus.extension.jetty.TestJettyTestSetup
>     [javac] public class TestJettyTestSetup extends TestCase
>     [javac]        ^
>     [javac] 2 errors
> I think it's because some directories are added several times. Not
> why though.
> Is there a simpler way to achieve this? (it sounds very complex)
> I'm using Ant 1.6.1.
> Thanks
> -Vincent
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: For additional

> commands, e-mail:

To unsubscribe, e-mail: For additional
commands, e-mail:

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:
For additional commands, e-mail:

View raw message