ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Neta Bar Tal" <>
Subject RE: Want javac task to not fail on non-existent src directories
Date Mon, 21 Jun 2004 14:19:39 GMT

Hi Jeremy,
I did the same . I used <for> of ant-contrib and I'm attaching it here.

<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}"/>


The only thing you need to define is the ${dynamics}, which suppose to
hold all your src dirs.


-----Original Message-----
Sent: Saturday: June 19: 2004 1:59 AM
Subject: Want javac task to not fail on non-existent src directories

Hi Folks,

	This should be a simple one:

I need to call the javac task on several src dirs.  In come cases, some
or all of these directories won't exist. 

Right now I have:

                <javac destdir="${build}" debug="true">
                  <src path="${src}"/>
                  <src path="${test}"/>
                  <src path="${itest}"/>
                  <src path="${ptest}"/>
                  <classpath refid="stdclasspath"/>

I get the error "srcdir does not exist." When any of these directories
are missing.  Sometimes all of them will be missing...but for each that
is there, I want to build the files and put them in destdir.

So what's the best way to do this?


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