karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Baptiste Onofré (Commented) (JIRA) <j...@apache.org>
Subject [jira] [Commented] (KARAF-971) Add support for version ranges in features descriptor <repository/> element
Date Mon, 19 Dec 2011 15:57:31 GMT

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

Jean-Baptiste Onofré commented on KARAF-971:
--------------------------------------------

Crap, version range is well supported by pax-url-mvn (so it works fine in Karaf 2.2.x), but
not on pax-url-aether (so on Karaf trunk/3.0.0).

On trunk, when I try to register a features URL with a version range, I have an exception:

karaf@root> feature:add-url mvn:org.apache.cxf.karaf/apache-cxf/[2,3)/xml/features
Error executing command: Unable to add repositories:
        Unable to add features repository mvn:org.apache.cxf.karaf/apache-cxf/[2,3)/xml/features

The complete stack trace gives:

org.apache.karaf.shell.console.MultiException: Unable to add repositories:
        Unable to add features repository mvn:org.apache.cxf.karaf/apache-cxf/[2,3)/xml/features
        at org.apache.karaf.shell.console.MultiException.throwIf(MultiException.java:87)
        at org.apache.karaf.features.command.AddUrlCommand.doExecute(AddUrlCommand.java:61)
        at org.apache.karaf.features.command.FeaturesCommandSupport.doExecute(FeaturesCommandSupport.java:40)
        at org.apache.karaf.shell.console.AbstractAction.execute(AbstractAction.java:33)
        at org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:39)
        at org.apache.karaf.shell.commands.basic.AbstractCommand.execute(AbstractCommand.java:33)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.aries.proxy.impl.ProxyHandler$1.invoke(ProxyHandler.java:54)
        at org.apache.aries.proxy.impl.ProxyHandler.invoke(ProxyHandler.java:119)
        at org.apache.karaf.shell.console.commands.$BlueprintCommand237656761.execute(Unknown
Source)
        at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)
        at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477)
        at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403)
        at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)
        at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)
        at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)
        at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)
        at org.apache.karaf.shell.console.jline.Console.run(Console.java:166)
        at java.lang.Thread.run(Thread.java:662)
java.lang.Exception: Unable to add features repository mvn:org.apache.cxf.karaf/apache-cxf/[2,3)/xml/features
        at org.apache.karaf.features.command.AddUrlCommand.doExecute(AddUrlCommand.java:52)
        at org.apache.karaf.features.command.FeaturesCommandSupport.doExecute(FeaturesCommandSupport.java:40)
        at org.apache.karaf.shell.console.AbstractAction.execute(AbstractAction.java:33)
        at org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:39)
        at org.apache.karaf.shell.commands.basic.AbstractCommand.execute(AbstractCommand.java:33)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.aries.proxy.impl.ProxyHandler$1.invoke(ProxyHandler.java:54)
        at org.apache.aries.proxy.impl.ProxyHandler.invoke(ProxyHandler.java:119)
        at org.apache.karaf.shell.console.commands.$BlueprintCommand237656761.execute(Unknown
Source)
        at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)
        at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477)
        at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403)
        at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)
        at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)
        at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)
        at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)
        at org.apache.karaf.shell.console.jline.Console.run(Console.java:166)
        at java.lang.Thread.run(Thread.java:662)
Caused by: java.io.IOException: Aether Error.
        at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:234)
        at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:221)
        at org.ops4j.pax.url.mvn.internal.Connection.getInputStream(Connection.java:120)
        at org.apache.karaf.features.internal.FeatureValidationUtil.load(FeatureValidationUtil.java:81)
        at org.apache.karaf.features.internal.FeatureValidationUtil.validate(FeatureValidationUtil.java:55)
        at org.apache.karaf.features.internal.FeaturesServiceImpl.validateRepository(FeaturesServiceImpl.java:213)
        at org.apache.karaf.features.internal.FeaturesServiceImpl.internalAddRepository(FeaturesServiceImpl.java:224)
        at org.apache.karaf.features.internal.FeaturesServiceImpl.addRepository(FeaturesServiceImpl.java:218)
        at Proxy17f918e8_cdbe_4f9d_a8a5_1656b828ebf8.addRepository(Unknown Source)
        at org.apache.karaf.features.command.AddUrlCommand.doExecute(AddUrlCommand.java:50)
        ... 20 more
Caused by: org.sonatype.aether.resolution.ArtifactResolutionException: Could not find artifact
org.apache.cxf.karaf:apache-cxf:xml:features:[2,3) in local (file:/home/jbonofre/.m2/repository/)
        at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:541)
        at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:220)
        at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:197)
        at org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:323)
        at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:232)
        ... 29 more
Caused by: org.sonatype.aether.transfer.ArtifactNotFoundException: Could not find artifact
org.apache.cxf.karaf:apache-cxf:xml:features:[2,3) in local (file:/home/jbonofre/.m2/repository/)
        at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:945)
        at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:940)
        at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.flush(WagonRepositoryConnector.java:695)
        at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.flush(WagonRepositoryConnector.java:689)
        at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.get(WagonRepositoryConnector.java:445)
        at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:460)
        ... 33 more

                
> Add support for version ranges in features descriptor <repository/> element
> ---------------------------------------------------------------------------
>
>                 Key: KARAF-971
>                 URL: https://issues.apache.org/jira/browse/KARAF-971
>             Project: Karaf
>          Issue Type: Improvement
>    Affects Versions: 2.2.4
>            Reporter: Gert Vanthienen
>            Assignee: Jean-Baptiste Onofré
>             Fix For: 2.2.5, 3.0.0
>
>
> Some features include a <repository/> element to refer to another feature descriptor.
 For example: http://search.maven.org/remotecontent?filepath=org/apache/camel/karaf/apache-camel/2.8.2/apache-camel-2.8.2-features.xml
contains a reference to the CXF features descriptor. 
> For referring to the cxf feature, it already uses a version range [2.4, 2.6) and if you
put the same version range on the repository element URL, it would just get resolved by Pax
Url Maven support.  
> It would be good if the features service would first check for a matching features descriptor
- if there's already a matching descriptor installed, it could just use the existing and skip/ignore
the repository resolution.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

Mime
View raw message