maven-m2-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilles Dodinet <>
Subject Re: cvs commit: maven-components/maven-artifact/src/main/java/org/apache/maven/artifact
Date Sun, 20 Jun 2004 12:39:07 GMT
Michal Maczka wrote:

>For example when Artifact collector is working it needs to use
><groupId>:<artifactId>:<type> as id for finding conflicts,
>When I have two artifacts of the same id but different version - I know
>that conflict has been found. 
>As I see it now for some other functions we will 
>need to use "short" version of  id: <groupId>:<artifactId>:<type>
>and for some others "long" version:
>The thing is that at the moment much more often 
>we need to use "short id" and "long id" can be easly generated from
>"short id" but reverse is not so easy to achieve in a clean way.
>Maybe in fact we can have two methods in Dependency:
>getShortId()  and getLongId()
>So dIon - yes you are right that apache:struts:jar:1.0 and
>apache:struts:jar:2.0 are two different artifacts but it seems to me
>that for our internal needs we more often have to put them into the same
Glad to see this appears in m2. Indeed such comparison methods are 
really needed for integration, and in mevenide we use
util classes to support the exact scheme michal described. equals, 
relaxEquals and strictEquals method names make sense to me where
equals could delegate to relaxEquals or strictEquals. In addition it 
would be very nice if there were a #conflict(AbstractMavenArtifact) method.

Related i have a question about jar override. to specify override we now 
use maven.jar.<artifactId>, however what if same artifactId is shared by 
different artifacts, that have either the same groupId (only the type 
differs) or a completly different groupId (maybe same type) ?

-- gd

View raw message