You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2019/01/30 02:39:00 UTC

[jira] [Commented] (KARAF-6116) karaf-maven-plugin adds incorrect snapshot version to repository

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

ASF GitHub Bot commented on KARAF-6116:
---------------------------------------

diamondq commented on pull request #743: [KARAF-6116] Adds support to karaf-maven-plugin add-to-repo for timestamped snapshots
URL: https://github.com/apache/karaf/pull/743
 
 
   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.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> karaf-maven-plugin adds incorrect snapshot version to repository
> ----------------------------------------------------------------
>
>                 Key: KARAF-6116
>                 URL: https://issues.apache.org/jira/browse/KARAF-6116
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf
>    Affects Versions: 4.2.2
>            Reporter: Mike Mansell
>            Priority: Major
>              Labels: maven
>             Fix For: 4.2.3
>
>
> When using the features-add-to-repository goal of the karaf-maven-plugin, and it's resolving a feature that has an explicit snapshot version (ie. 0.1.0-20190111.021945-8), it copies the SNAPSHOT version and not the explicit version (ie. it copies GROUPID/ARTIFACTID/0.1.0-SNAPSHOT/ARTIFACTID-0.1.0-SNAPSHOT.jar instead of GROUPID/ARTIFACTID/0.1.0-SNAPSHOT/ARTIFACTID-0.1.0-20190111.021945-8.jar).
> This is because the MavenUtil.getFileName() uses artifact.getBaseVersion() instead of artifact.getVersion().
> I believe this is a bug since looking at the Dependency31Helper.pathFromAether() which effectively provides the same functionality, it correctly uses the version and not base version.
> I understand that this goal is deprecated, but it is quite useful when building just a Maven repo instead of the entire distribution (which can then be easily layered into an existing Karaf Docker container), and it's a one-line change.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)