You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Justin Edelson (JIRA)" <ji...@apache.org> on 2013/11/27 23:06:35 UTC

[jira] [Commented] (SLING-3261) Unable to overwrite bundles with a non OSGi standard version

    [ https://issues.apache.org/jira/browse/SLING-3261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13834212#comment-13834212 ] 

Justin Edelson commented on SLING-3261:
---------------------------------------

FWIW, the source for the maven-osgi shared component is here: http://svn.apache.org/repos/asf/maven/shared/trunk/maven-osgi/src/main/java/org/apache/maven/shared/osgi/DefaultMaven2OsgiConverter.java

I wonder if this version comparision is even necessary. I'll have to doublecheck, but it seems like you should be able to downgrade bundles from an upstream list. Why shouldn't it just be the last bundle definition wins?

> 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)