ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raja Nagendra Kumar <>
Subject Javac or a New Task (ClassSourceCopy) with Source Files Copy option
Date Fri, 02 Oct 2009 09:25:35 GMT

In the world of internet and pressure to reuse as much as possible, there is
a need for able to copy only the files which were used to generate the class

In a declarations like this

<javac destdir="${build.deploy.classes}"
	    <src id="sp.tezzd.src">
		<pathelement path="${src}"/>

		<path refid="sp.module"/>
                 <path refid="sp.common"/>

		<path refid="cp.module"/>
		<path refid="cp.jpa.compiler.plugin"/>
	    <compilerarg line="${javac.compiler.options}"/>
	    <compilerarg line="${jpa.options}"/>

The sourcepath would result in compile the needed sources as used by the
files defined in src.
This approach would mean lesser classes and hence jar size. However, for
version management and reference and for back up, one needs to store all the
files including all sources as defined in sourcepath. For a SME's where
every thing matter including to be more simple backup, we see the need for
having only the copy the sources which are used and not all the sources
which are not used by this compile.

Seeing such generality need, thought of putting across to forum if it is
nice to have a option for javac to copy the sources which are used. 

I understand ant's javac task does not do this dependency check directory
but the underlaying javac.exe of sun does this.

Raja Nagendra Kumar,
View this message in context:
Sent from the Ant - Dev mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message