Christian
Christian

Reputation: 14077

Sonatype Nexus, maven.oracle.com and non-existant artifacts

We are using Sonatype Nexus to proxy the maven repository http://maven.oracle.com. Recently it fails to resolve some artifacts which already exist for quite a while and still do. In the logs I can find these messages:

2016-11-01 13:56:55,914+0100 INFO  [qtp1990129127-84] ciserver org.sonatype.nexus.proxy.repository.validator.DefaultFileTypeValidatorHub - File item Oracle:/org/apache/ws/jaxme/maven-jaxme-plugin/maven-metadata.xml evaluated as INVALID during file type validation (validator=maven)
2016-11-01 13:56:55,916+0100 INFO  [qtp1990129127-84] ciserver org.sonatype.nexus.proxy.maven.maven2.M2Repository - Proxied item Oracle:/org/apache/ws/jaxme/maven-jaxme-plugin/maven-metadata.xml evaluated as INVALID during content validation (validator=filetypevalidator, sourceUrl=https://maven.oracle.com/org/apache/ws/jaxme/maven-jaxme-plugin/maven-metadata.xml)
2016-11-01 13:57:40,761+0100 INFO  [qtp1990129127-88] ciserver org.sonatype.nexus.proxy.repository.validator.DefaultFileTypeValidatorHub - File item Oracle:/com/oracle/weblogic/weblogic-server-pom/maven-metadata.xml evaluated as INVALID during file type validation (validator=maven)
2016-11-01 13:57:40,762+0100 INFO  [qtp1990129127-88] ciserver org.sonatype.nexus.proxy.maven.maven2.M2Repository - Proxied item Oracle:/com/oracle/weblogic/weblogic-server-pom/maven-metadata.xml evaluated as INVALID during content validation (validator=filetypevalidator, sourceUrl=https://maven.oracle.com/com/oracle/weblogic/weblogic-server-pom/maven-metadata.xml)

While maven-jaxme-plugin does not exist on maven.oracle.com it still has some (broken) metadata in the proxy repository. Deleting these helps until the artifact is requested again. The artifact weblogic-server-pom onm the other hand exists on maven.oracle.com but is not served by the proxy any more as soon as those messages appear in the log. It helps to clear the cache - but only until maven-jaxme-plugin is requested again.

I have created a nexus.properties file to contain settings like described here. But it did not change anything for me.

When visiting the first URL from the logs with a WebBrowser I get a 404 if I'm logged in. Which seems fine. But probably there's a problem with the redirects (301) until then?

How can I avoid to let that non-existent artifact break the metadata for the proxy repository?

Upvotes: 3

Views: 845

Answers (1)

ck1
ck1

Reputation: 5443

I'm not able to replicate the problem you're having with proxying to maven.oracle.com using Nexus Repository Manager OSS 2.14.1-01. This seems to be working fine with respect to resolving and downloading two test artifacts below.

In terms of the log messages you're seeing, I'd recommend doing the following on Nexus:

1) Disable File Content Validation on the Oracle Maven proxy repository in your Nexus instance;

2) Right click on the Oracle repository and select Expire Cache, so that artifacts are redownloaded from Oracle;

3) On the client side, use mvn -U to force Maven to check Nexus for dependencies.

Test artifacts:

<!-- Found in maven.oracle.com. -->
<dependency>
    <groupId>com.oracle.weblogic</groupId>
    <artifactId>wls-api</artifactId>
    <version>12.1.3-0-0</version>
</dependency>

<!-- Found in Maven Central. -->
<dependency>
    <groupId>org.apache.ws.jaxme</groupId>
    <artifactId>maven-jaxme-plugin</artifactId>
    <version>1.0.3</version>
</dependency>

References:

Nexus Documentation: https://books.sonatype.com/nexus-book/reference/confignx-sect-manage-repo.html

Upvotes: 1

Related Questions