当前位置: 首页 > 知识库问答 >
问题:

在Karaf中添加新的mvn url失败,回购规范为空

湛联
2023-03-14

我在本地Karaf4.0.2安装中的mvn.cfg文件中添加了一个新的mvn url,如下所示:

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/cont

基本上,我现在感兴趣的是最后一个带有@snapshots的。它包含一个特性xml,它指定了我要安装在本地Karaf中的包。回购协议驻留在其他地方。

当我在karaf控制台中键入以下内容时:

特性:repo-添加mvn:com.axiell.lsp.integrations/utils/1.0-snapshot/xml/features

我得到错误: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是空字符串。:mvn:com.axiell.lsp.integrations/utils/1.0-snapshot/xml/features

这是日志中的stacktrace。

,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

我尝试了所有可能的组合,但我总是得到错误存储库规范是空的。这里有什么问题?提前道谢。

共有1个答案

别锐
2023-03-14

您必须给maven存储库一个ID。尝试:

http://artifactory.lsp.axiell.com/artifactory/libs-snapshot-release@id=axiell@snapshots
 类似资料:
  • 例如,我从官方页面下载了预构建的ODL。然后我想把烤面包机样本作为一个新的氧气模块,它是用命令创建的: 编译之后,它将生成构建文件到本地maven存储库()。我将复制到Karaf默认存储库文件夹。然后我想让它在中可用,这样我就可以用进行安装。首先我需要将其添加到回购列表中: 不幸的是,它显示了一个错误: 执行命令时出错:错误解析工件com.example.toaster:features-toas

  • 之后,我在Intellij IDEA中导入了一个项目,它无法解决任何依赖。因为在设置->Build Tools->Maven->Repositories in the Indexed Maven Repositories中,它只有本地回购。那么,如何添加Maven中央存储库呢?

  • 问题内容: 单击后,我想重新标记“ 添加到购物车” 按钮,然后将一项添加到购物车, 再添加到购物车中 。 这可能吗? 我有第二个 转到购物车* 按钮的Child-Theme function.php ,并且它正在工作。 * 但是我不知道在将一件商品添加到购物车后如何解决此重新标签问题(商店仅出售一件尺寸不同的商品)。我希望我很清楚。 这是我的代码: 问题答案: 更新: 在下面,您将找到使此重新标记

  • 我正在尝试创建一个以Lambda函数为目标的AWS Eventbridge规则。我可以添加规则和目标,但当我尝试通过RoleArn设置lambda权限时,Cloudformation堆栈部署失败,目标arn不支持RoleArn:aws:lambda:us-east-1:1234567890:功能:联系lambda消费新客户。(服务:AmazonCloudWatchEvents;状态代码:400;错

  • 我需要某人的帮助。 我遵循教程使用Kafka Connect和Debezium将数据从MySQL流式传输到Kafka,但是使用Debezium MySQL连接器将MySQL连接到Kafka服务器时遇到了麻烦。 这是我的设置和其他信息。 操作系统:视窗10。 Kafka连接:合流5.0。 MySQL连接器:0.8.1最终版本。 我保存文件 我添加插件路径 当我尝试连接Kafka Connect时,它

  • 问题内容: TL; DR:如何在ModelForm中为ForeignKey添加“添加新”按钮? 长版:我在项目中使用Django 1.7。我的models.py中有这两个模型 [省略了一些其他不相关的字段] 我正在使用ModelForm用新命令填充数据库,如下所示: Django在为客户字段添加下拉菜单方面做得很好,并在其中添加了来自客户的条目。不过,我想拥有一个“添加新客户”链接/按钮/以便在添