Problem accessing maven repository https://artifacts.elastic.co/maven

Attempting to write an x-pack custom realm based on : https://github.com/elastic/shield-custom-realm-example

Attempting to add the elasticsearch-releases repo to nexus as a proxy repository but getting an error:

jvm 1    | 2017-04-04 12:22:38 WARN  [y-3-thread-5500] - org.sonatype.nexus.proxy.maven.maven2.M2Repository - Remote peer of proxy repository "elasticsearch-releases" [id=elastic] threw a org.sonatype.nexus.proxy.ItemNotFoundException exception. - Cause(s): Item not found for request "ResourceStoreRequest(requestPath="/")" in repository ""elasticsearch-releases" [id=elastic]"!

Then an attempt to build yeilds:

Downloading: http://district9:8081/nexus/content/groups/public/org/elasticsearch/plugin/x-pack-api/5.1.1/x-pack-api-5.1.1.pom
[WARNING] The POM for org.elasticsearch.plugin:x-pack-api:jar:5.1.1 is missing, no dependency information available

In my pom.xml:

<repositories>
   <repository>
      <id>elastic</id>
           <name>elasticsearch-releases</name>
      <url>https://artifacts.elastic.co/maven</url>
   </repository>
</repositories>

Versions:

  • elasticsearch and x-pack-api : 5.1.1
  • maven: 3.3.9
  • nexus: 2.3 (pretty old)

I believe that you need to add a mirror to elasticsearch repository in your Nexus instance.
So Nexus will know where to download those artifacts.

Thanks for your response David.
What URL do I use for the mirror given the repo URL of https://artifacts.elastic.co/maven?
This repo is using https, do I need to provide authentication username or password.
Perhaps, I need to configure my nexus instance with the correct certificates:
https://books.sonatype.com/nexus-book/reference/ssl-sect-client-cert.html

Is there a link to download just the JAR in the same way that you can download xpack itself (https://artifacts.elastic.co/downloads/packs/x-pack/x-pack-5.1.1.zip)?

You were right, I was still using the default mirror for everything. Something like the following configuration worked for me. Thank you for your time David.

<mirrors>
    <mirror>
        <id>archiva.default</id>
        <url>http://district9:8081/nexus/content/groups/public</url>
        <mirrorOf>*,!elastic</mirrorOf>
    </mirror>
    <mirror>
        <id>elastic.default</id>
        <name>elastic</name>
        <url>http://district9:8081/nexus/content/repositories/elastic</url>
        <mirrorOf>elastic</mirrorOf>
    </mirror>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.