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] [Updated] (KARAF-3150) kar:install doesn't support classifier in a MVN URL
Date Thu, 07 Aug 2014 17:06:12 GMT

     [ https://issues.apache.org/jira/browse/KARAF-3150?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jean-Baptiste Onofré updated KARAF-3150:
----------------------------------------

    Summary: kar:install doesn't support classifier in a MVN URL  (was: kar:install doesn't
support classifier in the URL)

> kar:install doesn't support classifier in a MVN URL
> ---------------------------------------------------
>
>                 Key: KARAF-3150
>                 URL: https://issues.apache.org/jira/browse/KARAF-3150
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-kar
>    Affects Versions: 3.0.0, 3.0.1
>            Reporter: Jean-Baptiste Onofré
>            Assignee: Jean-Baptiste Onofré
>             Fix For: 4.0.0, 3.0.2
>
>
> If we try to install a kar file from an Maven URL with a classifier specified, like:
> {code}
> karaf@root()> kar:install mvn:net.nanthrax.test/mykar/1.0-SNAPSHOT/kar
> {code}
> The installation failed:
> {code}
> 2014-08-07 19:00:26,931 | ERROR | Local user karaf | ShellUtil                      
 | 36 - org.apache.karaf.shell.console - 3.0.2.SNAPSHOT | Exception caught while executing
command
> java.lang.StringIndexOutOfBoundsException: String index out of range: -1
>         at java.lang.String.substring(String.java:1911)[:1.7.0_60]
>         at org.apache.karaf.kar.internal.Kar.getKarName(Kar.java:184)
>         at org.apache.karaf.kar.internal.KarServiceImpl.install(KarServiceImpl.java:81)
>         at Proxy28784e70_7f8e_45aa_8b1f_b7179df47301.install(Unknown Source)
>         at Proxy12db03da_8271_4ebf_a543_b050f2e97f44.install(Unknown Source)
>         at org.apache.karaf.kar.command.InstallKarCommand.doExecute(InstallKarCommand.java:31)
>         at org.apache.karaf.shell.console.AbstractAction.execute(AbstractAction.java:33)[36:org.apache.karaf.shell.console:3.0.2.SNAPSHOT]
>         at org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:39)[36:org.apache.karaf.shell.console:3.0.2.SNAPSHOT]
>         at org.apache.karaf.shell.commands.basic.AbstractCommand.execute(AbstractCommand.java:33)[36:org.apache.karaf.shell.console:3.0.2.SNAPSHOT]
>         at Proxy9fb8c546_f855_4e72_94e3_a5d4e6dcc8cd.execute(Unknown Source)[:]
>         at Proxy9fb8c546_f855_4e72_94e3_a5d4e6dcc8cd.execute(Unknown Source)[:]
>         at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)[36:org.apache.karaf.shell.console:3.0.2.SNAPSHOT]
>         at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477)[36:org.apache.karaf.shell.console:3.0.2.SNAPSHOT]
>         at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403)[36:org.apache.karaf.shell.console:3.0.2.SNAPSHOT]
>         at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[36:org.apache.karaf.shell.console:3.0.2.SNAPSHOT]
>         at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)[36:org.apache.karaf.shell.console:3.0.2.SNAPSHOT]
>         at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)[36:org.apache.karaf.shell.console:3.0.2.SNAPSHOT]
>         at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:92)
>         at org.apache.karaf.shell.console.impl.jline.ConsoleImpl$DelegateSession.execute(ConsoleImpl.java:528)
>         at org.apache.karaf.shell.console.impl.jline.ConsoleImpl.run(ConsoleImpl.java:213)
>         at java.lang.Thread.run(Thread.java:745)[:1.7.0_60]
>         at org.apache.karaf.shell.console.impl.jline.ConsoleFactoryService$3.doRun(ConsoleFactoryService.java:126)[36:org.apache.karaf.shell.console:3.0.2.SNAPSHOT]
>         at org.apache.karaf.shell.console.impl.jline.ConsoleFactoryService$3$1.run(ConsoleFactoryService.java:117)
>         at java.security.AccessController.doPrivileged(Native Method)[:1.7.0_60]
>         at org.apache.karaf.jaas.modules.JaasHelper.doAs(JaasHelper.java:47)[37:org.apache.karaf.jaas.modules:3.0.2.SNAPSHOT]
>         at org.apache.karaf.shell.console.impl.jline.ConsoleFactoryService$3.run(ConsoleFactoryService.java:115)[36:org.apache.karaf.shell.console:3.0.2.SNAPSHOT]
> {code}
> It's due to the fact that the Kar service parses the URL to determine the kar name (here
mykar for instance). This parsing doesn't handle a classifier.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message