maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian E. Fox" <>
Subject RE: MNG-4056, please comment
Date Mon, 02 Mar 2009 00:43:54 GMT
Seems logical to me. I don't know why there are these special mappings
in the first place. Sources is the other one that comes to mind... if
true you should handle that the same.

-----Original Message-----
From: Benjamin Bentmann [] 
Sent: Sunday, March 01, 2009 9:11 AM
To: Maven Developers List
Subject: MNG-4056, please comment


I recently created a patch for MNG-4056 and would appreciate some 
comments whether that's the proper way to address the issue.

In short, this issue is about the subtle difference between




i.e. <type>test-jar</type> vs. <classifier>tests</classifier>. While

both declarations work during builds of the consumer project that run up

to the "install" phase, only the latter declaration will allow proper 
dependency resolution from the reactor during an earlier lifecycle phase

like "package" (see also comments in MNG-2045 [0]).

The cause for this difference is that resolution from the reactor 
matches artifacts by their dependency conflict id which has the form 
gid:aid:type:classifier. For the first dependency declaration above, the

type is "jar" which doesn't match the type "test-jar" as used for the 
attached test JAR.

In case matching by dependency conflict id fails, the proposed patch 
falls back to another id I called repository conflict id (well, it 
needed to have a name...). The important difference is that the 
repository conflict id has the form gid:aid:extension:classifier, i.e. 
uses the file extension instead of the type.

The rationale for this approach is the observation that the repository 
layout does not use the artifact type but the file extension to 
distinguish files. In other words, the ids
get mapped to the same physical file in the repository, namely
i.e. there's an aliasing effect in the repository which the patch mimics

for dependency resolution from the reactor.

It solves the problem from a user's perspective but I'm not sure whether

this kind of artifact identity is clean from a design perspective. WDYT?



To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message