If you can get the list of directories into a file you could use loadfile to
load the file into a property. You can then transform the property into a
delimited list then use the antcontrib for to process the list.

You can use filterchain with loadfile to help make the delimited list. There
is a reg ex filter that can be useful if you need to extract just part of
the dir name on each line.

HTH
Bill 

-----Original Message-----
From: S I [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 22, 2005 3:06 PM
To: user@ant.apache.org
Subject: ANT: Javac question

Hi

I'm currently trying to convert many archaic batch files that invoke the
build manually to ant/xml to automate my job.  I'll give you a synopsis of
my current problem and how it's set up right now and try to articulate what
I intend to accomplish.

Keep in mind that I inherited these BATCH files and I did NOT write them! 
And that's why I'm trying to convert to Ant/Xml.  I've basically had a crash
course in Ant and have read so many tutorials that everything is now
becoming blurry & my mind's going numb!  We're in a Windows Java shop and
the final product is deployed on linux servers.

-----------------in JDK.bat-------------------------------------

... preceding lines omitted (environment set up blah blah)

cd %1

#where %1 is an absolute path I CD into & run the compiler command [below]
in that Dir/subdir! The %1 one variable is actually passed as an Arg to this
file from a master file where all the path are stored in SPECIFIC ORDER and
there're about 150 lines of paths fed to the compiler. e.g. 
project\client\api, project\client\api\session, so on...

javac -g -d  c:\projects\classes -classpath classpath declared here!
....
--------------------------------------------------------------------

************ here's a snippet of my xml file *********** I have more stuff
in this file but I will spare you the details & get right to the point.

<property name="CLASSES" value="C:\project\classes" />

<target name="compile" depends="">
   <javac srcdir="${src}"  # this is equivalent to the %1 out of the
jdk-batch file, right?
         destdir="${CLASSES}"
         includes="mypackage/p1/CVS"
         classpath="${STUFF}\*.jar, ${STUFF}\*.zip, ${JDBC}\*.jar,
${JDBC}\*.zip, ${TOMCAT}\*.jar"
         debug="on"
  />

************************************************

I've read Fileset, Dirset, FileMapper, & Classpath literature and unless
I've overlooked something... I don't see anything to suit my need.  Is there
a utility or task which would allow me to declare or traverse a list of
paths (150 lines) in a specific order and feed them to the compiler as
${src} or %1?

Thank you

Steve



---------------------------------------------------------------------
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