ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <ste...@apache.org>
Subject Re: JavaC and sourcepath
Date Thu, 20 Mar 2008 15:58:35 GMT
Raja Nagendra Kumar wrote:
> Hi,
> 
> In ant script like the following with both srcdir and sourcepath..
> 
> <javac encoding="ascii"
> 	       target="1.5"
> 	       debug="true"
> 	       extdirs=""
> 	       srcdir="${src}"
> 	       destdir="${classes}"
> 	       bootclasspath="${android-jar}">
> 	    <sourcepath path="${PROJECT_HOME}/common/src"/>
> 	    <sourcepath path="${PROJECT_HOME}/j2me/src"/>
> 	    <sourcepath path="${COMMON_SHARED_CODE_HOME}"/>
> 	    <sourcepath path="${J2ME_SHARED_CODE_HOME}"/>
> 	</javac>
> 
> I am looking to copy the source code files to seperate directory after the
> javac task. For this I know all the files in srcdir is one copy and other
> source files could be some of the files as referenced in by java code of src
> file.
> 
> As I don't know what are the referenced files in the directories    
> 
> <sourcepath path="${PROJECT_HOME}/common/src"/>
> 	    <sourcepath path="${PROJECT_HOME}/j2me/src"/>
> 	    <sourcepath path="${COMMON_SHARED_CODE_HOME}"/>
> 	    <sourcepath path="${J2ME_SHARED_CODE_HOME}"/>
> 
> I am unable to copy them, other than copying all.. Could any tell me how to
> get all the source files which were compiled by javac task. if this feature
> does not exist, it may be good candidate to provide the same in new version
> of ant :)
> 

1. define <filesets> of source files, use them in the <javac> and the <copy>

2. Ant doesnt know which files got compiled, as java has the right to 
-on demand- compile any file it determines it needs. The list of files 
Ant felt had changed is not enough.

-- 
Steve Loughran                  http://www.1060.org/blogxter/publish/5
Author: Ant in Action           http://antbook.org/

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


Mime
View raw message