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

Markus Rathgeb commented on KARAF-4105:
---------------------------------------

The versions are compared using string equality function.

{noformat}
    private boolean matches(Feature f, Dependency featureRef) {
        String version = featureRef.getVersion();
        return f.getName().equals(featureRef.getName()) 
            && (version == null || version.equals("0.0.0")|| 
version.startsWith("[") || f.getVersion().equals(version));
    }
{noformat}

I would prefer using the comparision that is available in maven themselves.
But I don't now if this will break something others.

So change and test?

> karaf-assembly fails when used Maven versions do not match derived OSGi 
> versions
> --------------------------------------------------------------------------------
>
>                 Key: KARAF-4105
>                 URL: https://issues.apache.org/jira/browse/KARAF-4105
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-tooling
>    Affects Versions: 4.0.3
>            Reporter: Oliver Lietz
>
> e.g. {{$\{project.version\}}} {{0.1.1-SNAPSHOT}} and {{0.1.1.SNAPSHOT}} do 
> not match in {{org.apache.karaf.profile.assembly.Builder}}
> See mail thread [\[K4.0.3\] custom distribution and 
> kar|http://mail-archives.apache.org/mod_mbox/karaf-user/201511.mbox/%3c7781910.EKNrsAyV2X@madness%3e]
>  for more.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to