You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by jb...@apache.org on 2019/01/30 05:16:44 UTC

[karaf] branch master updated: [KARAF-6116] Adds support to karaf-maven-plugin add-to-repo for timestamped snapshots

This is an automated email from the ASF dual-hosted git repository.

jbonofre pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/karaf.git


The following commit(s) were added to refs/heads/master by this push:
     new 089f77e  [KARAF-6116] Adds support to karaf-maven-plugin add-to-repo for timestamped snapshots
     new 5db02be  Merge pull request #743 from diamondq/KARAF-6116
089f77e is described below

commit 089f77e09e1f6e96135245748361e478203d85a0
Author: Mike Mansell <me...@michaelmansell.com>
AuthorDate: Tue Jan 29 18:37:18 2019 -0800

    [KARAF-6116] Adds support to karaf-maven-plugin add-to-repo for timestamped snapshots
    
    Following the design in the Aether resolver library, the file name should use the artifact's version and not the base version. For timestamped snapshots (ie. 0.1.0-20190111.021945-8), the base version resolves to (0.1.0-SNAPSHOT).
    Without this change, normal Maven resolving (ie. within Karaf when using a mvn: URL), of a timestamped artifact won't work since it'll be looking for the wrong file name.
---
 .../src/main/java/org/apache/karaf/tooling/utils/MavenUtil.java         | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/utils/MavenUtil.java b/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/utils/MavenUtil.java
index 1803e86..9c4c427 100644
--- a/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/utils/MavenUtil.java
+++ b/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/utils/MavenUtil.java
@@ -208,7 +208,7 @@ public class MavenUtil {
     }
     
     public static String getFileName(Artifact artifact) {
-        return artifact.getArtifactId() + "-" + artifact.getBaseVersion()
+        return artifact.getArtifactId() + "-" + artifact.getVersion()
             + (artifact.getClassifier() != null ? "-" + artifact.getClassifier() : "") + "." + artifact.getType();
     }