ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antoine Levy-Lambert" <anto...@gmx.de>
Subject Re: srcdir attribute and <src> element in the javac task
Date Wed, 01 Jun 2005 08:41:05 GMT
Hello Glenn,

this is not going to work.
you need something like that
 <javac destdir="${build.dir}/coreFramework/classes" >
       <src>
         <fileset dir="${scm.dir}/abc/project1/src"/>
         <fileset dir="${scm.dir}/abc/project2/src"/>
         <fileset dir="${scm.dir}/foo/bar/project4/src"/>
         <fileset dir="${scm.dir}/foo/bar/project3/src"/>
       </src>
       <classpath>
         <fileset dir="${scm.dir}/">
           <include name="**/${jar.project}/lib/*.jar" />
         </fileset>
       </classpath>
     </javac>

In other words, the base directory of filesets nested in the src element
of the javac task must always be the java package directories, where
typically you will have a first subdirectory com, ...
If you want to compile a variable number of projects at once like that,
you might have to generate your build.xml using a shell script or a
stylesheet.
What you can do would be to have a build.xml for each subproject (even if it
is mostly standard) and call each subproject build.xml using subant for
instance.

Cheers,

Antoine
> --- Urspr√ľngliche Nachricht ---
> Von: glenn.h.brown@jpmorgan.com
> An: "Ant Users List" <user@ant.apache.org>
> Betreff: srcdir attribute and <src> element in the javac task
> Datum: Tue, 31 May 2005 17:00:32 -0500
> 
> 
> My impression from reading the docs was that the srcdir attribute and the
> <src> element were interchangable when using the javac task. However when
> I
> execute the code given below I get the message that srcdir attribute must
> be set.
> 

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


Mime
View raw message