You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by souciance <so...@gmail.com> on 2016/09/25 12:43:33 UTC

adding new mvn repository fails with repository spec is empty

Hello,

I have added a new mvn url in the mvn.cfg file like below:

org.ops4j.pax.url.mvn.repositories= \
    http://repo1.maven.org/maven2@id=central, \
   
http://repository.springsource.com/maven/bundles/release@id=spring.ebr.release,
\
   
http://repository.springsource.com/maven/bundles/external@id=spring.ebr.external,
\
    http://zodiac.springsource.com/maven/bundles/release@id=gemini, \
   
http://repository.apache.org/content/groups/snapshots-group@id=apache@snapshots@noreleases,
\
   
https://oss.sonatype.org/content/repositories/snapshots@id=sonatype.snapshots.deploy@snapshots@noreleases,
\
   
https://oss.sonatype.org/content/repositories/ops4j-snapshots@id=ops4j.sonatype.snapshots.deploy@snapshots@noreleases,
\
   
http://repository.springsource.com/maven/bundles/external@id=spring-ebr-repository@snapshots@noreleases,
\
	http://jenkins:8081/artifactory/simple/repo/@id=central, \	
	http://artifactory.lsp.axiell.com/artifactory/maven-central@id=central, \

http://artifactory.lsp.axiell.com/artifactory/libs-snapshot-release@snapshots

Basically the one I am interested in now is the last one with @snapshots. It
contains a feature xml that specifies a bundle that I want to install in my
local karaf. The repo resides somewhere else.

When I type the following in the karaf console:

feature:repo-add
mvn:com.axiell.lsp.integrations/utils/1.0-SNAPSHOT/xml/features

I get the error:
karaf@root()> feature:repo-add
mvn:com.axiell.lsp.integrations/utils/1.0-SNAPSHOT/xml/features
Adding feature url
mvn:com.axiell.lsp.integrations/utils/1.0-SNAPSHOT/xml/features
*Error executing command: Repository spec is empty string. :
mvn:com.axiell.lsp.integrations/utils/1.0-SNAPSHOT/xml/features*

This is the stacktrace in the logs.

,framework=org.apache.felix.framework,uuid=a1dc4a95-fb3b-440d-a6fd-e458f91bedbb
2016-09-25 14:36:49,195 | ERROR | nsole user karaf | ShellUtil                       
| 45 - org.apache.karaf.shell.core - 4.0.2 | Exception caught while
executing command
java.io.IOException: Repository spec is empty string. :
mvn:com.axiell.lsp.integrations/utils/1.0-20160925.111911-1/xml/features
        at
org.apache.karaf.features.internal.service.RepositoryImpl.load(RepositoryImpl.java:85)[8:org.apache.karaf.features.core:4.0.2]
        at
org.apache.karaf.features.internal.service.FeaturesServiceImpl.loadRepository(FeaturesServiceImpl.java:391)[8:org.apache.karaf.features.core:4.0.2]
        at
org.apache.karaf.features.internal.service.FeaturesServiceImpl.addRepository(FeaturesServiceImpl.java:411)[8:org.apache.karaf.features.core:4.0.2]
        at
org.apache.karaf.features.command.RepoAddCommand.doExecute(RepoAddCommand.java:50)[32:org.apache.karaf.features.command:4.0.2]
        at
org.apache.karaf.features.command.FeaturesCommandSupport.execute(FeaturesCommandSupport.java:37)[32:org.apache.karaf.features.command:4.0.2]
        at
org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:83)[45:org.apache.karaf.shell.core:4.0.2]
        at
org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:67)[45:org.apache.karaf.shell.core:4.0.2]
        at
org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:87)[45:org.apache.karaf.shell.core:4.0.2]
        at
org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:480)[45:org.apache.karaf.shell.core:4.0.2]
        at
org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:406)[45:org.apache.karaf.shell.core:4.0.2]
        at
org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[45:org.apache.karaf.shell.core:4.0.2]
        at
org.apache.felix.gogo.runtime.Closure.execute(Closure.java:182)[45:org.apache.karaf.shell.core:4.0.2]
        at
org.apache.felix.gogo.runtime.Closure.execute(Closure.java:119)[45:org.apache.karaf.shell.core:4.0.2]
        at
org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:94)[45:org.apache.karaf.shell.core:4.0.2]
        at
org.apache.karaf.shell.impl.console.ConsoleSessionImpl.run(ConsoleSessionImpl.java:268)[45:org.apache.karaf.shell.core:4.0.2]
        at java.lang.Thread.run(Thread.java:745)[:1.8.0_71]
Caused by: shaded.org.ops4j.lang.NullArgumentException: Repository spec is
empty string.
        at
shaded.org.ops4j.lang.NullArgumentException.validateNotEmpty(NullArgumentException.java:109)
        at
org.ops4j.pax.url.mvn.internal.config.MavenRepositoryURL.<init>(MavenRepositoryURL.java:94)[7:org.ops4j.pax.url.mvn:2.4.3]
        at
org.ops4j.pax.url.mvn.internal.config.MavenConfigurationImpl.getRepositories(MavenConfigurationImpl.java:315)[7:org.ops4j.pax.url.mvn:2.4.3]
        at
org.ops4j.pax.url.mvn.internal.AetherBasedResolver.selectRepositories(AetherBasedResolver.java:349)[7:org.ops4j.pax.url.mvn:2.4.3]
        at
org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:523)[7:org.ops4j.pax.url.mvn:2.4.3]
        at
org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:506)[7:org.ops4j.pax.url.mvn:2.4.3]
        at
org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:481)[7:org.ops4j.pax.url.mvn:2.4.3]
        at
org.ops4j.pax.url.mvn.internal.Connection.getInputStream(Connection.java:123)[7:org.ops4j.pax.url.mvn:2.4.3]
        at java.net.URL.openStream(URL.java:1045)[:1.8.0_71]
        at
org.apache.karaf.features.internal.service.RepositoryImpl.load(RepositoryImpl.java:80)[8:org.apache.karaf.features.core:4.0.2]
        ... 15 more
2016-09-25 14:36:56,109 | ERROR | nsole user karaf | ShellUtil                       
| 45 - org.apache.karaf.shell.core - 4.0.2 | Exception caught while
executing command
java.io.IOException: Repository spec is empty string. :
mvn:com.axiell.lsp.integrations/utils/1.0-SNAPSHOT/xml/features
        at
org.apache.karaf.features.internal.service.RepositoryImpl.load(RepositoryImpl.java:85)[8:org.apache.karaf.features.core:4.0.2]
        at
org.apache.karaf.features.internal.service.FeaturesServiceImpl.loadRepository(FeaturesServiceImpl.java:391)[8:org.apache.karaf.features.core:4.0.2]
        at
org.apache.karaf.features.internal.service.FeaturesServiceImpl.addRepository(FeaturesServiceImpl.java:411)[8:org.apache.karaf.features.core:4.0.2]
        at
org.apache.karaf.features.command.RepoAddCommand.doExecute(RepoAddCommand.java:50)[32:org.apache.karaf.features.command:4.0.2]
        at
org.apache.karaf.features.command.FeaturesCommandSupport.execute(FeaturesCommandSupport.java:37)[32:org.apache.karaf.features.command:4.0.2]
        at
org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:83)[45:org.apache.karaf.shell.core:4.0.2]
        at
org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:67)[45:org.apache.karaf.shell.core:4.0.2]
        at
org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:87)[45:org.apache.karaf.shell.core:4.0.2]
        at
org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:480)[45:org.apache.karaf.shell.core:4.0.2]
        at
org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:406)[45:org.apache.karaf.shell.core:4.0.2]
        at
org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[45:org.apache.karaf.shell.core:4.0.2]
        at
org.apache.felix.gogo.runtime.Closure.execute(Closure.java:182)[45:org.apache.karaf.shell.core:4.0.2]
        at
org.apache.felix.gogo.runtime.Closure.execute(Closure.java:119)[45:org.apache.karaf.shell.core:4.0.2]
        at
org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:94)[45:org.apache.karaf.shell.core:4.0.2]
        at
org.apache.karaf.shell.impl.console.ConsoleSessionImpl.run(ConsoleSessionImpl.java:268)[45:org.apache.karaf.shell.core:4.0.2]
        at java.lang.Thread.run(Thread.java:745)[:1.8.0_71]
Caused by: shaded.org.ops4j.lang.NullArgumentException: Repository spec is
empty string.
        at
shaded.org.ops4j.lang.NullArgumentException.validateNotEmpty(NullArgumentException.java:109)
        at
org.ops4j.pax.url.mvn.internal.config.MavenRepositoryURL.<init>(MavenRepositoryURL.java:94)[7:org.ops4j.pax.url.mvn:2.4.3]
        at
org.ops4j.pax.url.mvn.internal.config.MavenConfigurationImpl.getRepositories(MavenConfigurationImpl.java:315)[7:org.ops4j.pax.url.mvn:2.4.3]
        at
org.ops4j.pax.url.mvn.internal.AetherBasedResolver.selectRepositories(AetherBasedResolver.java:349)[7:org.ops4j.pax.url.mvn:2.4.3]
        at
org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:523)[7:org.ops4j.pax.url.mvn:2.4.3]
        at
org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:506)[7:org.ops4j.pax.url.mvn:2.4.3]
        at
org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:481)[7:org.ops4j.pax.url.mvn:2.4.3]
        at
org.ops4j.pax.url.mvn.internal.Connection.getInputStream(Connection.java:123)[7:org.ops4j.pax.url.mvn:2.4.3]
        at java.net.URL.openStream(URL.java:1045)[:1.8.0_71]
        at
org.apache.karaf.features.internal.service.RepositoryImpl.load(RepositoryImpl.java:80)[8:org.apache.karaf.features.core:4.0.2]
        ... 15 more


I have tried every possible combination but I always get the error
repository spec is empty. What could be the issue here? Thanks in advance.

Best
Souciance




--
View this message in context: http://karaf.922171.n3.nabble.com/adding-new-mvn-repository-fails-with-repository-spec-is-empty-tp4048159.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: adding new mvn repository fails with repository spec is empty

Posted by souciance <so...@gmail.com>.
Hi,

I managed to solve it. There were two issues. 1) The id was missing. 2) One
of other mvn urls had a space at the end and this caused the error with
repository spec is empty. Once the space was removed it worked.

Best
Souciance

On Sun, Sep 25, 2016 at 8:52 PM, jbonofre [via Karaf] <
ml-node+s922171n4048163h75@n3.nabble.com> wrote:

> Did you have provided @id ?
>
> It's now mandatory.
>
> Regards
> JB
>
> On 09/25/2016 02:43 PM, souciance wrote:
>
> > Hello,
> >
> > I have added a new mvn url in the mvn.cfg file like below:
> >
> > org.ops4j.pax.url.mvn.repositories= \
> >     http://repo1.maven.org/maven2@id=central, \
> >
> > http://repository.springsource.com/maven/bundles/release@id=spring.ebr.
> release,
> > \
> >
> > http://repository.springsource.com/maven/bundles/external@id=spring.
> ebr.external,
> > \
> >     http://zodiac.springsource.com/maven/bundles/release@id=gemini, \
> >
> > http://repository.apache.org/content/groups/snapshots-
> group@id=apache@snapshots@noreleases,
> > \
> >
> > https://oss.sonatype.org/content/repositories/snapshots@id=sonatype.
> snapshots.deploy@snapshots@noreleases,
> > \
> >
> > https://oss.sonatype.org/content/repositories/ops4j-
> snapshots@id=ops4j.sonatype.snapshots.deploy@snapshots@noreleases,
> > \
> >
> > http://repository.springsource.com/maven/bundles/external@id=spring-
> ebr-repository@snapshots@noreleases,
> > \
> > http://jenkins:8081/artifactory/simple/repo/@id=central, \
> > http://artifactory.lsp.axiell.com/artifactory/maven-central@id=central,
> \
> >
> > http://artifactory.lsp.axiell.com/artifactory/libs-snapshot-
> release@snapshots
> >
> > Basically the one I am interested in now is the last one with
> @snapshots. It
> > contains a feature xml that specifies a bundle that I want to install in
> my
> > local karaf. The repo resides somewhere else.
> >
> > When I type the following in the karaf console:
> >
> > feature:repo-add
> > mvn:com.axiell.lsp.integrations/utils/1.0-SNAPSHOT/xml/features
> >
> > I get the error:
> > karaf@root()> feature:repo-add
> > mvn:com.axiell.lsp.integrations/utils/1.0-SNAPSHOT/xml/features
> > Adding feature url
> > mvn:com.axiell.lsp.integrations/utils/1.0-SNAPSHOT/xml/features
> > *Error executing command: Repository spec is empty string. :
> > mvn:com.axiell.lsp.integrations/utils/1.0-SNAPSHOT/xml/features*
> >
> > This is the stacktrace in the logs.
> >
> > ,framework=org.apache.felix.framework,uuid=a1dc4a95-fb3b-440d-a6fd-e458f91bedbb
>
> > 2016-09-25 14:36:49,195 | ERROR | nsole user karaf | ShellUtil
> > | 45 - org.apache.karaf.shell.core - 4.0.2 | Exception caught while
> > executing command
> > java.io.IOException: Repository spec is empty string. :
> > mvn:com.axiell.lsp.integrations/utils/1.0-20160925.111911-1/xml/features
>
> >         at
> > org.apache.karaf.features.internal.service.RepositoryImpl.load(
> RepositoryImpl.java:85)[8:org.apache.karaf.features.core:4.0.2]
> >         at
> > org.apache.karaf.features.internal.service.FeaturesServiceImpl.
> loadRepository(FeaturesServiceImpl.java:391)[8:org.apache.karaf.features.core:4.0.2]
>
> >         at
> > org.apache.karaf.features.internal.service.FeaturesServiceImpl.
> addRepository(FeaturesServiceImpl.java:411)[8:org.apache.karaf.features.core:4.0.2]
>
> >         at
> > org.apache.karaf.features.command.RepoAddCommand.
> doExecute(RepoAddCommand.java:50)[32:org.apache.karaf.features.command:4.0.2]
>
> >         at
> > org.apache.karaf.features.command.FeaturesCommandSupport.execute(
> FeaturesCommandSupport.java:37)[32:org.apache.karaf.features.command:4.0.2]
>
> >         at
> > org.apache.karaf.shell.impl.action.command.ActionCommand.
> execute(ActionCommand.java:83)[45:org.apache.karaf.shell.core:4.0.2]
> >         at
> > org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(
> SecuredCommand.java:67)[45:org.apache.karaf.shell.core:4.0.2]
> >         at
> > org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(
> SecuredCommand.java:87)[45:org.apache.karaf.shell.core:4.0.2]
> >         at
> > org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.
> java:480)[45:org.apache.karaf.shell.core:4.0.2]
> >         at
> > org.apache.felix.gogo.runtime.Closure.executeStatement(
> Closure.java:406)[45:org.apache.karaf.shell.core:4.0.2]
> >         at
> > org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[45:
> org.apache.karaf.shell.core:4.0.2]
> >         at
> > org.apache.felix.gogo.runtime.Closure.execute(Closure.java:
> 182)[45:org.apache.karaf.shell.core:4.0.2]
> >         at
> > org.apache.felix.gogo.runtime.Closure.execute(Closure.java:
> 119)[45:org.apache.karaf.shell.core:4.0.2]
> >         at
> > org.apache.felix.gogo.runtime.CommandSessionImpl.execute(
> CommandSessionImpl.java:94)[45:org.apache.karaf.shell.core:4.0.2]
> >         at
> > org.apache.karaf.shell.impl.console.ConsoleSessionImpl.
> run(ConsoleSessionImpl.java:268)[45:org.apache.karaf.shell.core:4.0.2]
> >         at java.lang.Thread.run(Thread.java:745)[:1.8.0_71]
> > Caused by: shaded.org.ops4j.lang.NullArgumentException: Repository spec
> is
> > empty string.
> >         at
> > shaded.org.ops4j.lang.NullArgumentException.validateNotEmpty(
> NullArgumentException.java:109)
> >         at
> > org.ops4j.pax.url.mvn.internal.config.MavenRepositoryURL.<init>(
> MavenRepositoryURL.java:94)[7:org.ops4j.pax.url.mvn:2.4.3]
> >         at
> > org.ops4j.pax.url.mvn.internal.config.MavenConfigurationImpl.
> getRepositories(MavenConfigurationImpl.java:315)[7:org.ops4j.pax.url.mvn:2.4.3]
>
> >         at
> > org.ops4j.pax.url.mvn.internal.AetherBasedResolver.selectRepositories(
> AetherBasedResolver.java:349)[7:org.ops4j.pax.url.mvn:2.4.3]
> >         at
> > org.ops4j.pax.url.mvn.internal.AetherBasedResolver.
> resolve(AetherBasedResolver.java:523)[7:org.ops4j.pax.url.mvn:2.4.3]
> >         at
> > org.ops4j.pax.url.mvn.internal.AetherBasedResolver.
> resolve(AetherBasedResolver.java:506)[7:org.ops4j.pax.url.mvn:2.4.3]
> >         at
> > org.ops4j.pax.url.mvn.internal.AetherBasedResolver.
> resolve(AetherBasedResolver.java:481)[7:org.ops4j.pax.url.mvn:2.4.3]
> >         at
> > org.ops4j.pax.url.mvn.internal.Connection.getInputStream(Connection.
> java:123)[7:org.ops4j.pax.url.mvn:2.4.3]
> >         at java.net.URL.openStream(URL.java:1045)[:1.8.0_71]
> >         at
> > org.apache.karaf.features.internal.service.RepositoryImpl.load(
> RepositoryImpl.java:80)[8:org.apache.karaf.features.core:4.0.2]
> >         ... 15 more
> > 2016-09-25 14:36:56,109 | ERROR | nsole user karaf | ShellUtil
> > | 45 - org.apache.karaf.shell.core - 4.0.2 | Exception caught while
> > executing command
> > java.io.IOException: Repository spec is empty string. :
> > mvn:com.axiell.lsp.integrations/utils/1.0-SNAPSHOT/xml/features
> >         at
> > org.apache.karaf.features.internal.service.RepositoryImpl.load(
> RepositoryImpl.java:85)[8:org.apache.karaf.features.core:4.0.2]
> >         at
> > org.apache.karaf.features.internal.service.FeaturesServiceImpl.
> loadRepository(FeaturesServiceImpl.java:391)[8:org.apache.karaf.features.core:4.0.2]
>
> >         at
> > org.apache.karaf.features.internal.service.FeaturesServiceImpl.
> addRepository(FeaturesServiceImpl.java:411)[8:org.apache.karaf.features.core:4.0.2]
>
> >         at
> > org.apache.karaf.features.command.RepoAddCommand.
> doExecute(RepoAddCommand.java:50)[32:org.apache.karaf.features.command:4.0.2]
>
> >         at
> > org.apache.karaf.features.command.FeaturesCommandSupport.execute(
> FeaturesCommandSupport.java:37)[32:org.apache.karaf.features.command:4.0.2]
>
> >         at
> > org.apache.karaf.shell.impl.action.command.ActionCommand.
> execute(ActionCommand.java:83)[45:org.apache.karaf.shell.core:4.0.2]
> >         at
> > org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(
> SecuredCommand.java:67)[45:org.apache.karaf.shell.core:4.0.2]
> >         at
> > org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(
> SecuredCommand.java:87)[45:org.apache.karaf.shell.core:4.0.2]
> >         at
> > org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.
> java:480)[45:org.apache.karaf.shell.core:4.0.2]
> >         at
> > org.apache.felix.gogo.runtime.Closure.executeStatement(
> Closure.java:406)[45:org.apache.karaf.shell.core:4.0.2]
> >         at
> > org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[45:
> org.apache.karaf.shell.core:4.0.2]
> >         at
> > org.apache.felix.gogo.runtime.Closure.execute(Closure.java:
> 182)[45:org.apache.karaf.shell.core:4.0.2]
> >         at
> > org.apache.felix.gogo.runtime.Closure.execute(Closure.java:
> 119)[45:org.apache.karaf.shell.core:4.0.2]
> >         at
> > org.apache.felix.gogo.runtime.CommandSessionImpl.execute(
> CommandSessionImpl.java:94)[45:org.apache.karaf.shell.core:4.0.2]
> >         at
> > org.apache.karaf.shell.impl.console.ConsoleSessionImpl.
> run(ConsoleSessionImpl.java:268)[45:org.apache.karaf.shell.core:4.0.2]
> >         at java.lang.Thread.run(Thread.java:745)[:1.8.0_71]
> > Caused by: shaded.org.ops4j.lang.NullArgumentException: Repository spec
> is
> > empty string.
> >         at
> > shaded.org.ops4j.lang.NullArgumentException.validateNotEmpty(
> NullArgumentException.java:109)
> >         at
> > org.ops4j.pax.url.mvn.internal.config.MavenRepositoryURL.<init>(
> MavenRepositoryURL.java:94)[7:org.ops4j.pax.url.mvn:2.4.3]
> >         at
> > org.ops4j.pax.url.mvn.internal.config.MavenConfigurationImpl.
> getRepositories(MavenConfigurationImpl.java:315)[7:org.ops4j.pax.url.mvn:2.4.3]
>
> >         at
> > org.ops4j.pax.url.mvn.internal.AetherBasedResolver.selectRepositories(
> AetherBasedResolver.java:349)[7:org.ops4j.pax.url.mvn:2.4.3]
> >         at
> > org.ops4j.pax.url.mvn.internal.AetherBasedResolver.
> resolve(AetherBasedResolver.java:523)[7:org.ops4j.pax.url.mvn:2.4.3]
> >         at
> > org.ops4j.pax.url.mvn.internal.AetherBasedResolver.
> resolve(AetherBasedResolver.java:506)[7:org.ops4j.pax.url.mvn:2.4.3]
> >         at
> > org.ops4j.pax.url.mvn.internal.AetherBasedResolver.
> resolve(AetherBasedResolver.java:481)[7:org.ops4j.pax.url.mvn:2.4.3]
> >         at
> > org.ops4j.pax.url.mvn.internal.Connection.getInputStream(Connection.
> java:123)[7:org.ops4j.pax.url.mvn:2.4.3]
> >         at java.net.URL.openStream(URL.java:1045)[:1.8.0_71]
> >         at
> > org.apache.karaf.features.internal.service.RepositoryImpl.load(
> RepositoryImpl.java:80)[8:org.apache.karaf.features.core:4.0.2]
> >         ... 15 more
> >
> >
> > I have tried every possible combination but I always get the error
> > repository spec is empty. What could be the issue here? Thanks in
> advance.
> >
> > Best
> > Souciance
> >
> >
> >
> >
> > --
> > View this message in context: http://karaf.922171.n3.nabble.
> com/adding-new-mvn-repository-fails-with-repository-spec-is-
> empty-tp4048159.html
> > Sent from the Karaf - User mailing list archive at Nabble.com.
> >
>
> --
> Jean-Baptiste Onofré
> [hidden email] <http:///user/SendEmail.jtp?type=node&node=4048163&i=0>
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
> http://karaf.922171.n3.nabble.com/adding-new-mvn-repository-
> fails-with-repository-spec-is-empty-tp4048159p4048163.html
> To unsubscribe from adding new mvn repository fails with repository spec
> is empty, click here
> <http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4048159&code=c291Y2lhbmNlLmVxZGFtLnJhc2h0aUBnbWFpbC5jb218NDA0ODE1OXwxNTMyOTExNjU2>
> .
> NAML
> <http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://karaf.922171.n3.nabble.com/adding-new-mvn-repository-fails-with-repository-spec-is-empty-tp4048159p4048164.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: adding new mvn repository fails with repository spec is empty

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Did you have provided @id ?

It's now mandatory.

Regards
JB

On 09/25/2016 02:43 PM, souciance wrote:
> Hello,
>
> I have added a new mvn url in the mvn.cfg file like below:
>
> org.ops4j.pax.url.mvn.repositories= \
>     http://repo1.maven.org/maven2@id=central, \
>
> http://repository.springsource.com/maven/bundles/release@id=spring.ebr.release,
> \
>
> http://repository.springsource.com/maven/bundles/external@id=spring.ebr.external,
> \
>     http://zodiac.springsource.com/maven/bundles/release@id=gemini, \
>
> http://repository.apache.org/content/groups/snapshots-group@id=apache@snapshots@noreleases,
> \
>
> https://oss.sonatype.org/content/repositories/snapshots@id=sonatype.snapshots.deploy@snapshots@noreleases,
> \
>
> https://oss.sonatype.org/content/repositories/ops4j-snapshots@id=ops4j.sonatype.snapshots.deploy@snapshots@noreleases,
> \
>
> http://repository.springsource.com/maven/bundles/external@id=spring-ebr-repository@snapshots@noreleases,
> \
> 	http://jenkins:8081/artifactory/simple/repo/@id=central, \	
> 	http://artifactory.lsp.axiell.com/artifactory/maven-central@id=central, \
>
> http://artifactory.lsp.axiell.com/artifactory/libs-snapshot-release@snapshots
>
> Basically the one I am interested in now is the last one with @snapshots. It
> contains a feature xml that specifies a bundle that I want to install in my
> local karaf. The repo resides somewhere else.
>
> When I type the following in the karaf console:
>
> feature:repo-add
> mvn:com.axiell.lsp.integrations/utils/1.0-SNAPSHOT/xml/features
>
> I get the error:
> karaf@root()> feature:repo-add
> mvn:com.axiell.lsp.integrations/utils/1.0-SNAPSHOT/xml/features
> Adding feature url
> mvn:com.axiell.lsp.integrations/utils/1.0-SNAPSHOT/xml/features
> *Error executing command: Repository spec is empty string. :
> mvn:com.axiell.lsp.integrations/utils/1.0-SNAPSHOT/xml/features*
>
> This is the stacktrace in the logs.
>
> ,framework=org.apache.felix.framework,uuid=a1dc4a95-fb3b-440d-a6fd-e458f91bedbb
> 2016-09-25 14:36:49,195 | ERROR | nsole user karaf | ShellUtil
> | 45 - org.apache.karaf.shell.core - 4.0.2 | Exception caught while
> executing command
> java.io.IOException: Repository spec is empty string. :
> mvn:com.axiell.lsp.integrations/utils/1.0-20160925.111911-1/xml/features
>         at
> org.apache.karaf.features.internal.service.RepositoryImpl.load(RepositoryImpl.java:85)[8:org.apache.karaf.features.core:4.0.2]
>         at
> org.apache.karaf.features.internal.service.FeaturesServiceImpl.loadRepository(FeaturesServiceImpl.java:391)[8:org.apache.karaf.features.core:4.0.2]
>         at
> org.apache.karaf.features.internal.service.FeaturesServiceImpl.addRepository(FeaturesServiceImpl.java:411)[8:org.apache.karaf.features.core:4.0.2]
>         at
> org.apache.karaf.features.command.RepoAddCommand.doExecute(RepoAddCommand.java:50)[32:org.apache.karaf.features.command:4.0.2]
>         at
> org.apache.karaf.features.command.FeaturesCommandSupport.execute(FeaturesCommandSupport.java:37)[32:org.apache.karaf.features.command:4.0.2]
>         at
> org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:83)[45:org.apache.karaf.shell.core:4.0.2]
>         at
> org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:67)[45:org.apache.karaf.shell.core:4.0.2]
>         at
> org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:87)[45:org.apache.karaf.shell.core:4.0.2]
>         at
> org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:480)[45:org.apache.karaf.shell.core:4.0.2]
>         at
> org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:406)[45:org.apache.karaf.shell.core:4.0.2]
>         at
> org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[45:org.apache.karaf.shell.core:4.0.2]
>         at
> org.apache.felix.gogo.runtime.Closure.execute(Closure.java:182)[45:org.apache.karaf.shell.core:4.0.2]
>         at
> org.apache.felix.gogo.runtime.Closure.execute(Closure.java:119)[45:org.apache.karaf.shell.core:4.0.2]
>         at
> org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:94)[45:org.apache.karaf.shell.core:4.0.2]
>         at
> org.apache.karaf.shell.impl.console.ConsoleSessionImpl.run(ConsoleSessionImpl.java:268)[45:org.apache.karaf.shell.core:4.0.2]
>         at java.lang.Thread.run(Thread.java:745)[:1.8.0_71]
> Caused by: shaded.org.ops4j.lang.NullArgumentException: Repository spec is
> empty string.
>         at
> shaded.org.ops4j.lang.NullArgumentException.validateNotEmpty(NullArgumentException.java:109)
>         at
> org.ops4j.pax.url.mvn.internal.config.MavenRepositoryURL.<init>(MavenRepositoryURL.java:94)[7:org.ops4j.pax.url.mvn:2.4.3]
>         at
> org.ops4j.pax.url.mvn.internal.config.MavenConfigurationImpl.getRepositories(MavenConfigurationImpl.java:315)[7:org.ops4j.pax.url.mvn:2.4.3]
>         at
> org.ops4j.pax.url.mvn.internal.AetherBasedResolver.selectRepositories(AetherBasedResolver.java:349)[7:org.ops4j.pax.url.mvn:2.4.3]
>         at
> org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:523)[7:org.ops4j.pax.url.mvn:2.4.3]
>         at
> org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:506)[7:org.ops4j.pax.url.mvn:2.4.3]
>         at
> org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:481)[7:org.ops4j.pax.url.mvn:2.4.3]
>         at
> org.ops4j.pax.url.mvn.internal.Connection.getInputStream(Connection.java:123)[7:org.ops4j.pax.url.mvn:2.4.3]
>         at java.net.URL.openStream(URL.java:1045)[:1.8.0_71]
>         at
> org.apache.karaf.features.internal.service.RepositoryImpl.load(RepositoryImpl.java:80)[8:org.apache.karaf.features.core:4.0.2]
>         ... 15 more
> 2016-09-25 14:36:56,109 | ERROR | nsole user karaf | ShellUtil
> | 45 - org.apache.karaf.shell.core - 4.0.2 | Exception caught while
> executing command
> java.io.IOException: Repository spec is empty string. :
> mvn:com.axiell.lsp.integrations/utils/1.0-SNAPSHOT/xml/features
>         at
> org.apache.karaf.features.internal.service.RepositoryImpl.load(RepositoryImpl.java:85)[8:org.apache.karaf.features.core:4.0.2]
>         at
> org.apache.karaf.features.internal.service.FeaturesServiceImpl.loadRepository(FeaturesServiceImpl.java:391)[8:org.apache.karaf.features.core:4.0.2]
>         at
> org.apache.karaf.features.internal.service.FeaturesServiceImpl.addRepository(FeaturesServiceImpl.java:411)[8:org.apache.karaf.features.core:4.0.2]
>         at
> org.apache.karaf.features.command.RepoAddCommand.doExecute(RepoAddCommand.java:50)[32:org.apache.karaf.features.command:4.0.2]
>         at
> org.apache.karaf.features.command.FeaturesCommandSupport.execute(FeaturesCommandSupport.java:37)[32:org.apache.karaf.features.command:4.0.2]
>         at
> org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:83)[45:org.apache.karaf.shell.core:4.0.2]
>         at
> org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:67)[45:org.apache.karaf.shell.core:4.0.2]
>         at
> org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:87)[45:org.apache.karaf.shell.core:4.0.2]
>         at
> org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:480)[45:org.apache.karaf.shell.core:4.0.2]
>         at
> org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:406)[45:org.apache.karaf.shell.core:4.0.2]
>         at
> org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[45:org.apache.karaf.shell.core:4.0.2]
>         at
> org.apache.felix.gogo.runtime.Closure.execute(Closure.java:182)[45:org.apache.karaf.shell.core:4.0.2]
>         at
> org.apache.felix.gogo.runtime.Closure.execute(Closure.java:119)[45:org.apache.karaf.shell.core:4.0.2]
>         at
> org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:94)[45:org.apache.karaf.shell.core:4.0.2]
>         at
> org.apache.karaf.shell.impl.console.ConsoleSessionImpl.run(ConsoleSessionImpl.java:268)[45:org.apache.karaf.shell.core:4.0.2]
>         at java.lang.Thread.run(Thread.java:745)[:1.8.0_71]
> Caused by: shaded.org.ops4j.lang.NullArgumentException: Repository spec is
> empty string.
>         at
> shaded.org.ops4j.lang.NullArgumentException.validateNotEmpty(NullArgumentException.java:109)
>         at
> org.ops4j.pax.url.mvn.internal.config.MavenRepositoryURL.<init>(MavenRepositoryURL.java:94)[7:org.ops4j.pax.url.mvn:2.4.3]
>         at
> org.ops4j.pax.url.mvn.internal.config.MavenConfigurationImpl.getRepositories(MavenConfigurationImpl.java:315)[7:org.ops4j.pax.url.mvn:2.4.3]
>         at
> org.ops4j.pax.url.mvn.internal.AetherBasedResolver.selectRepositories(AetherBasedResolver.java:349)[7:org.ops4j.pax.url.mvn:2.4.3]
>         at
> org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:523)[7:org.ops4j.pax.url.mvn:2.4.3]
>         at
> org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:506)[7:org.ops4j.pax.url.mvn:2.4.3]
>         at
> org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:481)[7:org.ops4j.pax.url.mvn:2.4.3]
>         at
> org.ops4j.pax.url.mvn.internal.Connection.getInputStream(Connection.java:123)[7:org.ops4j.pax.url.mvn:2.4.3]
>         at java.net.URL.openStream(URL.java:1045)[:1.8.0_71]
>         at
> org.apache.karaf.features.internal.service.RepositoryImpl.load(RepositoryImpl.java:80)[8:org.apache.karaf.features.core:4.0.2]
>         ... 15 more
>
>
> I have tried every possible combination but I always get the error
> repository spec is empty. What could be the issue here? Thanks in advance.
>
> Best
> Souciance
>
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/adding-new-mvn-repository-fails-with-repository-spec-is-empty-tp4048159.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>

-- 
Jean-Baptiste Onofr
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com