ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ylan Segal" <>
Subject RE: Question on wildcard
Date Fri, 26 Oct 2001 15:37:42 GMT
Javac will compile everything under a source tree already with out you
having to include the .java files manually.

Just use javac like:

		<classpath refid="project.classpath"/>

In the above example the property {src.home} points to where all my sources
are stored (in directories corresponding to packages), {} is a
property that points to the directory where I want the compiled (.class)
files to go, they will also be in directories according to packages.
The classpath I usually set at the beggining of the project, but you can set
it there directly.

Good luck.

-----Original Message-----
From: []
Sent: Wednesday, October 24, 2001 5:33 PM
Subject: Question on wildcard


I am in the process of converting one Imakefile to Ant. I have not been able
to convert the following line in that Imakefile to Ant:

        @echo "$(JDK_ROOT)/bin/javac -classpath \"$(RELEASED_CLASS_PATH)\"
$(wildcard *.java)" > compile.cmd
This statement above basically creates a script that can in turn be used to
compile some java files. The directory in which this Imakefile is present
has some java filesthe number of which changes from time to time. So this
script, basically compiles all the java files in the given directory
together in one statement. The script 'command.cmd' generated basically has
space-seperated java files substituted for $(wildcard *.java).

I have not been able to figure out how to create the equivalent of this in
Ant. Please let me know how to convert this.



P.S: I attempted the following equivalent but it gives a colon-seperated
list of java files

<path id="java.path">

             <fileset dir="SampleTests">
             <include name="*.java"/>


             <property name="wildcard" refid="java.path">

        <echo file="compile.cmd" message="javac -classpath
${RELEASED_CLASS_PATH} ${wildcard}"/>

View raw message