karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Baptiste Onofré (JIRA) <j...@apache.org>
Subject [jira] [Commented] (KARAF-3019) karaf-maven-plugin cannot handle all types of mvn urls
Date Thu, 18 Dec 2014 13:21:14 GMT

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

Jean-Baptiste Onofré commented on KARAF-3019:

By the way, I tested with karaf-maven-plugin 3.0.2 and it works fine too: it's part of the
refactoring that I did on the plugin for 3.0.2.

> karaf-maven-plugin cannot handle all types of mvn urls
> ------------------------------------------------------
>                 Key: KARAF-3019
>                 URL: https://issues.apache.org/jira/browse/KARAF-3019
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-tooling
>    Affects Versions: 3.0.1
>            Reporter: Kai Reichert
>            Assignee: Jean-Baptiste Onofré
>            Priority: Minor
>              Labels: karaf-maven-plugin
>             Fix For: 4.0.0, 3.0.2, 3.0.3
>         Attachments: pom.xml
> Some feature files list bundle references with maven repository urls.
> For example the apache-camel-2.13.1 feature file contains:
> {code:language=xml}
> <feature name='camel-script-groovy' version='2.13.1' resolver='(obr)' start-level='50'>
>     <bundle>mvn:http://scriptengines.googlecode.com/svn/m2-repo/!com.google.code.scriptengines/scriptengines-groovy/1.1</bundle>
> …
> {code}
> There is no problem if you install such a feature from the karaf shell. I think karaf
uses the pax url handler internally (see [https://ops4j1.jira.com/wiki/display/paxurl/Mvn+Protocol])
which handles repository urls, too.
> But if you try to provision a new karaf distribution with maven and the {{karaf-assembly}}
packaging type, those urls cannot be resolved. 
> Just try to include the bootFeature {{camel-script-groovy}} and you get the following
> {noformat}
> [ERROR] Failed to execute goal org.apache.karaf.tooling:karaf-maven-plugin:3.0.1:install-kars
(default-install-kars) on project karaf3-distribution: Couldn't resolve artifact mvn:http://scriptengines.googlecode.com/svn/m2-repo/!com.google.code.scriptengines/scriptengines-groovy/1.1:
Could not find artifact mvn:http:jar://scriptengines.googlecode.com/svn/m2-repo/!com.google.code.scriptengines/scriptengines-groovy/1.1
in central (http://repo1.maven.org/maven2) -> [Help 1]
> {noformat}
> If the plugin cannot or even should not try to include the maven repository it could
just ignore it in the resolution process (strip of the repository information from the url)
and report the repo url as a warning.
> The missing reference to the repository can then be included in the {{pom.xml}} file.

> I removed the repository information in the feature file inside my local maven repository
for testing purposes, included the missing repository in the {{pom.xml}} file and the karaf-plugin
was able to install the feature. 

This message was sent by Atlassian JIRA

View raw message