ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From LeeAnn Pultz <lee...@sesame.com>
Subject Point me in the right direction please?
Date Mon, 21 Oct 2002 21:47:55 GMT
Hi all

I have a task I need to perform during my build process, and I'm not
certain how to do it in Ant.

I have a folder
/com/company/dbpatches/

in which are various files, all of which are *.class files

I need to somehow list the current files in that folder, and add one line
to a script file for each of the files in that folder.

ie if in the folder there are 2 files
me.class
you.class

i want to append 2 lines to the bottom of
runme.sh

$$JAVA_HOME/bin/java -classpath $$JARS:$$TOMCAT_HOME/lib/common/servlet.jar
com.company.dbpatches.me.class
$$JAVA_HOME/bin/java -classpath $$JARS:$$TOMCAT_HOME/lib/common/servlet.jar
com.company.dbpatches.you.class

Is there any way of looping through a directory listing, and putting the
file names into variables that I can then concatenate onto the rest of the
string?
(ie the $$JAVA_HOME/bin/java -classpath
$$JARS:$$TOMCAT_HOME/lib/common/servlet.jar com.company.dbpatches. part)

Thanks in advance for any pointers you can give me!


LeeAnn Pultz
Sesame Technology
831-461-7100 x115
leeann@sesame.com



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


Mime
View raw message