ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Goktepe" <andrewgokt...@gmail.com>
Subject Re: common jar
Date Sat, 15 Jul 2006 19:03:33 GMT
You could force <javac> to compile only that package using the 'includes'
attribute. However, depending on how your project is set up, it's probably
better to make the separation when you create the jar files. Use
'includes'/'excludes' with the <jar> task to get the right classes into the
right jars.
http://ant.apache.org/manual/CoreTasks/jar.html

If the source for com.xyz.model is in a separate location from the client
and server code and doesn't import anything from either of those, then you
could just have separate <javac> and <jar> calls that create the common jar.
Then put that jar in the build classpath for the client and server projects:
http://ant.apache.org/manual/using.html#references

-Andrew


On 7/14/06, Bala Paranj <bparanj@yahoo.com> wrote:
>
> I have a package consisting of model classes that is shared between the
> client and server
> projects. I want to create a common.jar file that is shared by both the
> client and server ant
> scripts.
>
> How can I compile the com.xyz.model package only and exclude the
> compilation of other packages? I
> want to compile the other packages of the client project and specify the
> common jar as the
> dependency. How can do this? TIA.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message