For example if you have

 

org.ops4j.pax.url.mvn.repositories= \

    http://repo1.maven.org/maven2, \

 
http://people.apache.org/repo/m2-snapshot-reposit...@snapshots@norelease
s

 

and you look for a bundle such as 

 

features:addUrl mvn:a/b/1

 

you see

 

java.lang.RuntimeException: URL [mvn:a/b/1] could not be resolved.

        at
org.ops4j.pax.url.mvn.internal.Connection.getInputStream(Connection.java
:195)

        at
org.apache.felix.karaf.features.internal.RepositoryImpl.load(RepositoryI
mpl.java:89)

        at
org.apache.felix.karaf.features.internal.FeaturesServiceImpl.internalAdd
Repository(FeaturesServiceImpl.java:153)

        at
org.apache.felix.karaf.features.internal.FeaturesServiceImpl.addReposito
ry(FeaturesServiceImpl.java:146)

        at
org.apache.felix.karaf.features.command.AddUrlCommand.doExecute(AddUrlCo
mmand.java:34)

        at
org.apache.felix.karaf.features.command.FeaturesCommandSupport.doExecute
(FeaturesCommandSupport.java:39)

        at
org.apache.felix.karaf.shell.console.OsgiCommandSupport.execute(OsgiComm
andSupport.java:41)

        at
org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCom
mand.java:34)

        at
org.apache.felix.gogo.runtime.shell.CommandProxy.execute(CommandProxy.ja
va:45)

        at
org.apache.felix.gogo.runtime.shell.Closure.execute(Closure.java:211)

        at
org.apache.felix.gogo.runtime.shell.Closure.executeStatement(Closure.jav
a:146)

        at org.apache.felix.gogo.runtime.shell.Pipe.run(Pipe.java:91)

        at
org.apache.felix.gogo.runtime.shell.Closure.execute(Closure.java:75)

        at
org.apache.felix.gogo.runtime.shell.CommandSessionImpl.execute(CommandSe
ssionImpl.java:71)        at
org.apache.felix.karaf.shell.console.jline.Console.run(Console.java:115)

        at java.lang.Thread.run(Thread.java:619)

 

As expected.  However if you have a space at the end of the line (note
there is a space at the end of the second line!!)

 

org.ops4j.pax.url.mvn.repositories= \

    http://repo1.maven.org/maven2, \ 

 
http://people.apache.org/repo/m2-snapshot-reposit...@snapshots@norelease
s

 

and you try the same command you get

 

java.io.IOException: Repository spec is empty string. : mvn:a/b/1

        at
org.apache.felix.karaf.features.internal.RepositoryImpl.load(RepositoryI
mpl.java:161)

        at
org.apache.felix.karaf.features.internal.FeaturesServiceImpl.internalAdd
Repository(FeaturesServiceImpl.java:153)

        at
org.apache.felix.karaf.features.internal.FeaturesServiceImpl.addReposito
ry(FeaturesServiceImpl.java:146)

        at
org.apache.felix.karaf.features.command.AddUrlCommand.doExecute(AddUrlCo
mmand.java:34)

        at
org.apache.felix.karaf.features.command.FeaturesCommandSupport.doExecute
(FeaturesCommandSupport.java:39)

        at
org.apache.felix.karaf.shell.console.OsgiCommandSupport.execute(OsgiComm
andSupport.java:41)

        at
org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCom
mand.java:34)

        at
org.apache.felix.gogo.runtime.shell.CommandProxy.execute(CommandProxy.ja
va:45)

        at
org.apache.felix.gogo.runtime.shell.Closure.execute(Closure.java:211)

        at
org.apache.felix.gogo.runtime.shell.Closure.executeStatement(Closure.jav
a:146)

        at org.apache.felix.gogo.runtime.shell.Pipe.run(Pipe.java:91)

        at
org.apache.felix.gogo.runtime.shell.Closure.execute(Closure.java:75)

        at
org.apache.felix.gogo.runtime.shell.CommandSessionImpl.execute(CommandSe
ssionImpl.java:71)        at
org.apache.felix.karaf.shell.console.jline.Console.run(Console.java:115)

        at java.lang.Thread.run(Thread.java:619)

Caused by: org.ops4j.lang.NullArgumentException: Repository spec is
empty string.

        at
org.ops4j.lang.NullArgumentException.validateNotEmpty(NullArgumentExcept
ion.java:109)

        at
org.ops4j.pax.url.maven.commons.MavenRepositoryURL.<init>(MavenRepositor
yURL.java:67)

        at
org.ops4j.pax.url.maven.commons.MavenConfigurationImpl.getRepositories(M
avenConfigurationImpl.java:251)

        at
org.ops4j.pax.url.mvn.internal.Connection.collectPossibleDownloads(Conne
ction.java:213)

        at
org.ops4j.pax.url.mvn.internal.Connection.getInputStream(Connection.java
:170)

        at
org.apache.felix.karaf.features.internal.RepositoryImpl.load(RepositoryI
mpl.java:89)

        ... 14 more

 

Reply via email to