ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raja Nagendra Kumar <Nagendra.R...@tejasoft.com>
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
files.

In a declarations like this

<javac destdir="${build.deploy.classes}"
	       source="${source}"
	       debug="${debug}"
	       target="${target}">
	    <src id="sp.tezzd.src">
		<pathelement path="${src}"/>
		<pathelement
			path="${foundation.common.src}/com/tejasoft/foundation/model/bdo"/>
		<pathelement
			path="${foundation.j2se.src}/com/tejasoft/persist/jpa">
		</pathelement>
	    </src>

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

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

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.

Regards,
Raja Nagendra Kumar,
C.T.O
www.tejasoft.com
-- 
View this message in context: http://www.nabble.com/Javac-or-a-New-Task--%28ClassSourceCopy%29-with-Source-Files-Copy-option-tp25712826p25712826.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message