ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "S I" <xia...@hotmail.com>
Subject ANT: Javac question
Date Fri, 22 Apr 2005 22:06:14 GMT
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: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message