You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Wayne Fay <wa...@gmail.com> on 2006/08/01 03:00:20 UTC

Re: Howto declare a dependency on a group of modules

I think you're looking for something like this...

EJB Client projects
ejb1 - pom.xml
ejb2 - pom.xml
ejb3 - pom.xml

application-x-ejb-client - pom.xml
<dep>ejb1</dep>
<dep>ejb2</dep>
<dep>ejb3</dep>

app1 - pom.xml
<dep>application-x-ejb-client</dep>

When starting a new project (app1 above), you only need to declare a
single dependency on application-x-ejb-client project, which will
transitively pull in the ejb1, ejb2, and ejb3 dependencies.

Give this a try and stay flexible to try some other approaches as you
become more comfortable with Maven and fully integrate it into your
development process.

Wayne

On 7/31/06, Barrie Treloar <ba...@gmail.com> wrote:
> > Indeed, DRY is one benefit I want to get and we have several clients.
>
> > > I think it is important to explicit list your dependencies, otherwise
> > > you pull in cruft and the kitchen sink unnecessarily.
>
> You didn't respond to this.
> Do all clients have the SAME dependency set?
> Unless you are talking about a large number of client projects, and
> even then, I would still explicitly list the dependencies for each
> client.  As the dependencies should be correct for those clients and
> not include cruft because it is easier.
>
> > But think of a typical scenario, where client and middleware is
> > developed by separate
> > teams. You get decoupling of client dependency from client artifact
> > naming, versioning and partitioning,
> > which is controlled by the middleware team, if you use an
> > intermediate 'application-x-ejb-client' project.
>
> You get all this with maven out of the box anyway.
> There is no need for an intermediate.
> I am failing to follow what you are trying to do.
>
> I'd suggest trying it the hard way and seeing how you go.
> I think you will find it won't turn out to be hard or onerous.
>
> Of course you are using maven 2 right?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org