Return-Path: X-Original-To: apmail-karaf-issues-archive@minotaur.apache.org Delivered-To: apmail-karaf-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EC2B310990 for ; Wed, 12 Mar 2014 13:39:57 +0000 (UTC) Received: (qmail 90743 invoked by uid 500); 12 Mar 2014 13:39:49 -0000 Delivered-To: apmail-karaf-issues-archive@karaf.apache.org Received: (qmail 90487 invoked by uid 500); 12 Mar 2014 13:39:45 -0000 Mailing-List: contact issues-help@karaf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@karaf.apache.org Delivered-To: mailing list issues@karaf.apache.org Received: (qmail 90449 invoked by uid 99); 12 Mar 2014 13:39:44 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Mar 2014 13:39:44 +0000 Date: Wed, 12 Mar 2014 13:39:44 +0000 (UTC) From: "Igor Lazebny (JIRA)" To: issues@karaf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (KARAF-2820) features-maven-plugin:add-features-to-repo adds wrong transitive feature version MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/KARAF-2820?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13931758#comment-13931758 ] Igor Lazebny commented on KARAF-2820: ------------------------------------- Can't retest if it's really fixed for 2.3.x branch. Build fails. New issue created. https://issues.apache.org/jira/browse/KARAF-2821 > features-maven-plugin:add-features-to-repo adds wrong transitive feature version > -------------------------------------------------------------------------------- > > Key: KARAF-2820 > URL: https://issues.apache.org/jira/browse/KARAF-2820 > Project: Karaf > Issue Type: Bug > Components: karaf-tooling > Affects Versions: 2.3.4 > Reporter: Igor Lazebny > Assignee: Freeman Fang > > features-maven-plugin:add-features-to-repo tries to find greatest version of transitive feature to add. But the problem is it compares versions as string. So, for example, "2.7.7" > "2.7.10". > Here is that part in tooling/features-maven-plugin/src/main/java/org/apache/karaf/tooling/features/AddFeaturesToRepoMojo.java > 313 // looking for the feature name (with the greatest version) > 314 for (String key : featuresMap.keySet()) { > 315 String[] nameVersion = key.split("/"); > 316 if (feature.equals(nameVersion[0])) { > 317 if (f == null || f.getVersion().compareTo(featuresMap.get(key).getVersion()) < 0) { > 318 f = featuresMap.get(key); > 319 } > 320 } > 321 } > I have an example, which adds 2 features: cxf (2.7.10) and camel (2.12.2). Expected result: 2.7.10 CXF bundles in target/features-repo. Actual result: 2.7.7 CXF bundles - as transitive through Camel features descriptor. -- This message was sent by Atlassian JIRA (v6.2#6252)