[
https://issues.apache.org/jira/browse/SLING-3261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13834232#comment-13834232
]
Alex Parvulescu commented on SLING-3261:
----------------------------------------
I agree, you should simply be able to simply overwrite a bundle not caring
about versions.
It is also worth mentioning that this comparison happens backwards: you start
with the master list (CQ) and check if there are any overlaps with the partial
bundle list (Granite), then the merge will change versions only if the new
version (Granite) is newer than the old version (CQ). Dunno if it helps, but I
found this a bit confusing at first.
> Unable to overwrite bundles with a non OSGi standard version
> ------------------------------------------------------------
>
> Key: SLING-3261
> URL: https://issues.apache.org/jira/browse/SLING-3261
> Project: Sling
> Issue Type: Bug
> Components: Maven Plugins and Archetypes
> Affects Versions: Maven Launchpad Plugin 2.2.0
> Reporter: Alex Parvulescu
>
> I'm currently unable to overwrite bundles if they have a simple versioning
> scheme (not osgi compliant, major.minor.something).
> This applies to oak (we're at 0.x), but also external libs like google's
> guava:
> Original list.xml contains:
> {noformat}
> <bundle>
> <groupId>com.google.guava</groupId>
> <artifactId>guava</artifactId>
> <version>14.0.1</version>
> <runModes>crx3</runModes>
> </bundle>
> {noformat}
> Overwritten list.xml has newer versions:
> {noformat}
> <bundle>
> <groupId>com.google.guava</groupId>
> <artifactId>guava</artifactId>
> <version>15.0</version>
> <runModes>crx3</runModes>
> </bundle>
> {noformat}
> I've tracked down the problem to a faulty version comparison that is done via
> _DefaultMaven2OsgiConverter_ [0].
> The problem is with _converter.getVersion_ as outlined in the following
> example:
> {noformat}
> converter.getVersion("15.0") = 0.0.0.15_0
> converter.getVersion("14.0.1") = 14.0.1
> converter.getVersion("0.12-r1546058") = 0.0.0.0_12_r1546058
> {noformat}
> this means that the new version is viewed as older and will not be picked up.
> I realize that the bug may very well be in the _maven-osgi_ project, but as I
> have no idea where that is and the dependency needs to be updated in sling
> anyway, I'm putting it all in this issue.
> [0]
> http://svn.apache.org/viewvc/sling/trunk/tooling/maven/maven-launchpad-plugin/src/main/java/org/apache/sling/maven/projectsupport/bundlelist/BaseBundleList.java?view=markup#l84
--
This message was sent by Atlassian JIRA
(v6.1#6144)