milijan milijan - 1 year ago 112
Java Question

How to solve the issue of Nexus not finding artifacts from added repository for the exist-db database?

When I add dependency for the eXist-db artifacts inside my pom.xml for my project as explained on the official place for eXist artifacts everything works as expected. Here are the fragments added to the pom:



But than, when I want to use Nexus (nexus-2.14.4-03) for importing dependencies, I have trouble to make it work. In my project's pom.xml I have erased repositories element to make it work through the Nexus repository.

In Nexus I have added new proxy repository for the eXist-db artifacts. Than I have added that repository to the Public Repositories group. Also, inside maven's settings.xml I have added mirror code like this:

<name>Nexus Repository.</name>

Nexus repository seems to work. I can browse it from the Nexus, see it as global repository from the Eclipse, and inspect it in the browser with list of artifacts in it, except the eXist-db.

Back to the question. In my proxy repository settings for eXist-db inside Nexus, when I put as the Remote Storage Location, I have
Remote Automatically Blocked and Unavailable
message. Btw that link is redirected to the And from the wrapper.log file of Nexus I have this line:

admin - Remote peer of proxy repository "exist-db" [id=exist-db] threw a exception. Connection/transport problems occured while connecting to remote peer of the repository. Auto-blocking this repository to prevent further connection-leaks and known-to-fail outbound connections until administrator fixes the problems, or Nexus detects remote repository as healthy. - Cause(s): Unexpected response code while executing GET method [repositoryId="exist-db", requestPath="/", remoteUrl=""]. Expected: "SUCCESS (200)". Received: 400 : Bad Request

So, when I try to put this repo URL inside the web browser I am getting:
400: Invalid request
as expected.

I guessed that is not the right link for the proxy repository in Nexus, because Nexus needs the list of artifacts on that link. So, I have changed it to the
and the
Remote Automatically Blocked and Unavailable
message disappeared. These are the lines from the log:

INFO [proxy-3-thread-24] admin - Updating remote transport for proxy repository "exist-db" [id=exist-db]...
WARN [proxy-3-thread-24] admin - 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 - Applying Nexus Configuration due to changes in [Public Repositories] made by admin...
INFO [ar-4-thread-1] admin - Unpublished prefix file of "Public Repositories" [id=public] (and is marked for noscrape)
ERROR [qtp16973920-49] admin - java.lang.StringIndexOutOfBoundsException: String index out of range: -10
at java.lang.StringBuilder.substring( ~[na:1.8.0_131]
at ~[na:na]

Than I tried to update repository index from inside the Nexus, and these are the log lines from that action:

INFO [pxpool-1-thread-6] admin - Scheduled task (UpdateIndexTask) started :: Updating repository index "exist-db" from path / and below.
INFO [pxpool-1-thread-6] admin - Trying to get remote index for repository "exist-db" [id=exist-db]
INFO [pxpool-1-thread-6] admin - Cannot fetch remote index for repository "exist-db" [id=exist-db] as it does not publish indexes.
INFO [pxpool-1-thread-6] admin - Scanning of repositoryID="exist-db" started.
INFO [pxpool-1-thread-6] admin - 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 - Publishing index for repository exist-db
INFO [pxpool-1-thread-6] admin - 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)

At the end, in Nexus under Routing tab for my exist-db proxy repository I have:

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

Status: Unsuccessful.
Message: No scraper was able to scrape remote (or remote prevents scraping).

And I got the error message in Eclipse on project's pom.xml stating:

Missing artifact org.exist-db:exist-core:jar:3.2.0

Could someone tell me please what I am missing here?

Answer Source

The raw GitHub repo unfortunately only works with the mvn command line tool. It won't work as a source for a Nexus repo proxy.

However, my company maintain a public Nexus repo which contains the latest eXist artifacts here:

Whilst the above URL is still valid, we have now updated to Nexus 3, which prefers a newer URL style The repository should now be accessed from:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download