Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 如何解决Nexus无法从为exist db数据库添加的存储库中找到工件的问题?_Java_Maven_Nexus_Exist Db - Fatal编程技术网

Java 如何解决Nexus无法从为exist db数据库添加的存储库中找到工件的问题?

Java 如何解决Nexus无法从为exist db数据库添加的存储库中找到工件的问题?,java,maven,nexus,exist-db,Java,Maven,Nexus,Exist Db,当我在pom.xml中为我的项目添加对eXist db工件的依赖性时,一切都按预期工作。以下是添加到pom的片段: <dependencies> <dependency> <groupId>org.exist-db</groupId> <artifactId>exist-core</artifactId> <version>3.2.0</version> </dependency&g

当我在pom.xml中为我的项目添加对eXist db工件的依赖性时,一切都按预期工作。以下是添加到pom的片段:

<dependencies>
<dependency>
  <groupId>org.exist-db</groupId>
  <artifactId>exist-core</artifactId>
  <version>3.2.0</version>
</dependency>
</dependencies>

<repositories>
<repository>
  <id>exist</id>
  <url>https://raw.github.com/eXist-db/mvn-repo/master/</url>
</repository>
</repositories>
因此,当我尝试将此回购URL放在web浏览器中时,我得到的结果是:
400:Invalid request

我猜这不是Nexus中代理存储库的正确链接,因为Nexus需要该链接上的工件列表。因此,我将其更改为
https://github.com/eXist-db/mvn-repo
遥控器自动被阻止且不可用
消息消失。以下是日志中的行:

INFO  [proxy-3-thread-24] admin org.sonatype.nexus.proxy.storage.remote.httpclient.HttpClientRemoteStorage - Updating remote transport for proxy repository "exist-db" [id=exist-db]...
WARN  [proxy-3-thread-24] admin org.sonatype.nexus.proxy.maven.maven2.M2Repository - Remote peer of proxy repository "exist-db" [id=exist-db] detected as healthy, un-blocking the proxy repository (it was AutoBlocked by Nexus).
INFO  [qtp16973920-132] admin org.sonatype.nexus.configuration.application.DefaultNexusConfiguration - Applying Nexus Configuration due to changes in [Public Repositories] made by admin...
INFO  [ar-4-thread-1] admin org.sonatype.nexus.proxy.maven.routing.internal.ManagerImpl - Unpublished prefix file of "Public Repositories" [id=public] (and is marked for noscrape)
ERROR [qtp16973920-49] admin org.sonatype.nexus.rest.NexusRestletResource - java.lang.StringIndexOutOfBoundsException: String index out of range: -10
java.lang.AbstractStringBuilder.substring(AbstractStringBuilder.java:935)
at java.lang.StringBuilder.substring(StringBuilder.java:76) ~[na:1.8.0_131]
at org.sonatype.nexus.plugins.rrb.parsers.HtmlRemoteRepositoryParser.getLinkUrl(HtmlRemoteRepositoryParser.java:173) ~[na:na]
...
然后我尝试从Nexus内部更新存储库索引,下面是该操作的日志行:

INFO  [pxpool-1-thread-6] admin org.sonatype.nexus.index.tasks.UpdateIndexTask - Scheduled task (UpdateIndexTask) started :: Updating repository index "exist-db" from path / and below.
INFO  [pxpool-1-thread-6] admin org.sonatype.nexus.index.DefaultIndexerManager - Trying to get remote index for repository "exist-db" [id=exist-db]
INFO  [pxpool-1-thread-6] admin org.sonatype.nexus.index.DefaultIndexerManager - Cannot fetch remote index for repository "exist-db" [id=exist-db] as it does not publish indexes.
INFO  [pxpool-1-thread-6] admin org.sonatype.nexus.index.NexusScanningListener - Scanning of repositoryID="exist-db" started.
INFO  [pxpool-1-thread-6] admin org.sonatype.nexus.index.NexusScanningListener - Scanning of repositoryID="exist-db" finished: scanned=0, added=0, updated=0, removed=0, scanningDuration=0:00:00.328
INFO  [pxpool-1-thread-6] admin org.sonatype.nexus.index.DefaultIndexerManager - Publishing index for repository exist-db
INFO  [pxpool-1-thread-6] admin org.sonatype.nexus.index.tasks.UpdateIndexTask - Scheduled task (UpdateIndexTask) finished :: Updating repository index "exist-db" from path / and below. (started 2017-06-29T15:53:28+02:00, runtime 0:00:01.375)
最后,在我的exist db代理存储库的“路由”选项卡下的Nexus中,我有:

Publishing:
Status: Not published.
Message: Discovery in progress or unable to discover remote content (see discovery status).

Discovery:
Status: Unsuccessful.
Message: No scraper was able to scrape remote (or remote prevents scraping).
在Eclipse中,我在项目的pom.xml上得到了一条错误消息,指出:

Missing artifact org.exist-db:exist-core:jar:3.2.0
有人能告诉我这里缺少什么吗?
谢谢。

遗憾的是,原始GitHub repo只能与
mvn
命令行工具一起使用。它不能作为Nexus回购代理的源

然而,我的公司维持一个公共的Nexus回购协议,其中包含 此处最新存在的工件:


虽然上面的URL仍然有效,但我们现在已更新到Nexus 3,它更喜欢新的URL样式,存储库现在应该从中访问:

看起来像是坏了的,请参见此处的wontfix问题:尝试创建一个网站解决方案,建议使用如下URL:@Resove感谢此有用的信息。感谢您的回答。我真的很感激。但回购协议并不那么公开。我收到了“拒绝访问:请在尝试进一步请求之前登录”的消息。当我尝试通过浏览器访问它时,会收到一条消息,Nexus会发出“远程自动阻止且不可用”的消息。抱歉,这只是一个配置错误的提示。我们现在已经解决了这个问题,回购协议现在又公开了。谢谢你花时间解决这个问题。我对这个通过Nexus披露的新回购协议有一个问题,但为了解决这个问题,我删除了Nexus作为存储库,并依赖于在项目pom:
existhttp://repo.evolvedbinary.com/content/repositories/exist-db/
我得到一个错误:
无法读取的工件描述符org.exist db.thirdparty.se.softhouse:jargo:jar:0.4.2-SNAPSHOT-7fa1d04
未下载该工件。当存储库链接替换为
https://raw.github.com/eXist-db/mvn-repo/master/
一切正常。工件似乎确实在那里-也许你需要在你的项目上运行
mvn-U clean install
Publishing:
Status: Not published.
Message: Discovery in progress or unable to discover remote content (see discovery status).

Discovery:
Status: Unsuccessful.
Message: No scraper was able to scrape remote (or remote prevents scraping).
Missing artifact org.exist-db:exist-core:jar:3.2.0