Thanks for the response Antoine...

My example was a bit simplistic... In this case both componentA and
componentB are part of a logical project and will be versioned together.
So in this case I would like to compile them both in one step.

Is there a best-practice associated with something like this (I haven't
been able to find one)?

-Mike

-----Original Message-----
From: Antoine Levy-Lambert [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 28, 2006 1:54 PM
To: Ant Users List
Subject: Re: Sharing inter-project dependencies

Hello Michael,

one possibility to build the components independently is to use a
repository.

So componentB would just pull the jar of componentA from the repository,
and you do not make spaghetti programming between the build files of
componentA and componentB.

This is my preferred approach.

How you build your repository and which tools you use for that, there
are several possibilities including ivy, dpml, the maven 2 ant tasks and
a maven 2 like repository. AnthillPro 3 will also ship with its own
repository solution.

Regards,

Antoine


-------- Original-Nachricht --------
Datum: Mon, 28 Aug 2006 12:14:22 -0700
Von: "Nau, Michael" <[EMAIL PROTECTED]>
An: [email protected]
Betreff: Sharing inter-project dependencies

> I have a project with two java components: componentA and componentB.
> ComponentB had a compile-time dependency on componentA.
> 
> I've read many posts\articles on how to setup a master build script to

> manage the build process for both components. So far so good. But when

> I get to the point where I need to setup the compile classpath for 
> componentB... I stumble on how to reference componentA. Two options
are:
> 
> 1. Setup ComponentB's build script reference the 
> componentA/build/class dir.
> Advantage: Straightforward
> Disadvantage: componentB has internal knowledge of componentA's 
> project's layout | componentB can not be build independently
> 
> 2. Have the master build script copy componentA.jar into the 
> componentB/lib or root/lib and add the path to componentB's compile 
> classpath.
> Advantage: componentB has no knowledge of componentA's project layout
> Disadvantage: componentB can not be build independently
> 
> How are other handling this?
> 
> -Mike
> 
> _________________________________________________
> 
> This message is for the designated recipient only and may contain 
> privileged, proprietary, or otherwise private information. If you have

> received it in error, please notify the sender immediately and delete 
> the original. Any other use of the email by you is prohibited.
> 
> Dansk - Deutsch - Espanol - Francais - Italiano - Japanese - 
> Nederlands - Norsk - Portuguese - Svenska: 
> www.cardinalhealth.com/legal/email
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

> commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED] For additional
commands, e-mail: [EMAIL PROTECTED]

_________________________________________________

This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise private information. If you have received it in 
error, please notify the sender immediately and delete the original. Any other 
use of the email by you is prohibited.

Dansk - Deutsch - Espanol - Francais - Italiano - Japanese - Nederlands - Norsk 
- Portuguese - Svenska: www.cardinalhealth.com/legal/email

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to