Vincent Siveton wrote:
Hi,

Background:
Trying to mavenize an Eclipse Plugin project, I got error messages
like the following:
Couldn't find a version in [1.0.0-v20070606] to match range [1.0.0,2.0.0)
I put in jira a test project to reproduce this error [1].

Discussions:
After some investigations:
* the error comes from transitive dependencies (BTW I updated
DefaultArtifactCollector (r647445) to have the dependency trail).
* a version without qualifier is newer than a version with qualifier,
i.e in our case 1.0.0 is newer than 1.0.0-v20070606 (see also [2]
[3]). This logic is valid for alpha, beta (i.e. 1.0-alpha-1 < 1.0) but
not for Eclipse artifacts.
* Carlos in [4] suggested to use exclusions or dependencyManagement.
With this approach, POM will quickly become ugly (see for instance ASF
Directory Studio POM [6]). Moreover, the actual repo is just unusable
because transitive dependencies are not resolved at all due to the
current logic.

So, how to make the Eclipse repo workable for an Eclipse project? A
solution could be done in [1], but this might be Eclipse specific. At
least, the repo will work :)

Has anyone considered making eclipse:to-maven write version-ranges of the form [1.0.0-!,2.0.0) ? ("!" being the lowest valued printable unicode character, and so a pretty good approximation to the "oldest" possible qualifier according to the current comparison logic of Maven).

If the intent of the eclipse dependency is to match a version of 1.0.0 with any qualifier, this mapping seems to me to be the best way to translate that intent to Maven notation.

Max.



Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to