ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ylan Segal" <y...@digiworks.tv>
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:

	<javac
		srcdir="${src.home}"
		destdir="${compile.to}\">
		<classpath refid="project.classpath"/>
	</javac>

In the above example the property {src.home} points to where all my sources
are stored (in directories corresponding to packages), {compile.to} 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.
Ylan.

-----Original Message-----
From: Krish_Srinivas@i2.com [mailto:Krish_Srinivas@i2.com]
Sent: Wednesday, October 24, 2001 5:33 PM
To: ant-user@jakarta.apache.org
Subject: Question on wildcard



Hi

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

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

Thanks

K.Srinivas

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

             </path>

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

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


Mime
View raw message