maven-m2-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maczka Michal <michal.mac...@imtf.ch>
Subject RE: artifacts and types: summary
Date Thu, 24 Jun 2004 11:03:59 GMT


> -----Original Message-----
> From: Emmanuel Venisse [mailto:emmanuel@venisse.net]
> Sent: Thursday, June 24, 2004 12:12 PM
> To: Maven 2 Developers List
> Subject: Re: artifacts and types: summary
> 

[...]
> 
> > That's why I am so pertinacious that ejb client jar should 
> be seen as any
> > other jar.
> >
> >
> > We should have:
> > <dependency>
> >    <groupId>baa</groupId>
> >    <artifactId>foo</artifactId>
> >    <version>1.0</version>
> >    <type>ejb</type>
> > <dependency>
> 
> An app don't depend directly on ejb, but depend on client only.
> If we use the reactor for build all parts of an app, the 
> client app depend
> only on ejb-client, but the ejb project must be build before 
> client appfor
> use the correct ejb-client jar.

I don't think that it causes any problems for the recator.
In maven1 reactor uses "groupId:artifactId" as id of a project and tries to
find matching dependendencies 
(matching = the one which has the same id)
for constructing a graph. So for reactor only artifactId and groupId matter.
<type> does not.  

This is bit off topic here but it also shows (we were dissusing this in the
other thread) 
that really for dependencies we have to use in different situational context
3 types of id:

(a) id ="groupId:artifactId"
(b) id ="groupId:artifactId:type"
(c) id ="groupId:artifactId:type:version"

in maven1 we use all over the code only(a). 
IMO it will nice to clarify the names of thoses "ids"

Maybe something like: (better names are welcomed):

dependency.getProjectId()   (for (a)) 
dependency.getId()          (for (b))
dependency.getFullId()      (for (c))

what might be difficult is to decide which version of id (if any) should be
used in equals and hashCode methodes.


[...]
> >
> > The same thing can be done for rmi client/server jars. 
> Sources can be
> > shared.
> 
> No, if you compile twice, the stub/skeleton can be different and java
> generate an UnmarshallException
> 
> it's very necessary for ejb and rmi projects to have one project that
> generate 2 artifacts.
> Generated artifacts must be in correspondance.
> 

I agree that in some cases this must be done.

Michal

Mime
View raw message