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

**URL:** https://discuss.elastic.co/t/problem-accessing-maven-repository-https-artifacts-elastic-co-maven/81130
**Category:** Elasticsearch
**Created:** [April 4, 2017, 11:28am UTC](https://discuss.elastic.co/t/problem-accessing-maven-repository-https-artifacts-elastic-co-maven/81130 "2017-04-04T11:28:31Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![jhn134910](https://avatars.discourse-cdn.com/v4/letter/j/90ced4/32.png) [@jhn134910](https://discuss.elastic.co/u/jhn134910)
#### Post date: [April 4, 2017, 11:28am UTC](https://discuss.elastic.co/t/problem-accessing-maven-repository-https-artifacts-elastic-co-maven/81130/1 "2017-04-04T11:28:31Z")

</div>

Attempting to write an x-pack custom realm based on : [https://github.com/elastic/shield-custom-realm-example](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:

```auto
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:

```auto
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:

```auto
<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)

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [April 4, 2017, 12:54pm UTC](https://discuss.elastic.co/t/problem-accessing-maven-repository-https-artifacts-elastic-co-maven/81130/2 "2017-04-04T12:54:40Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![jhn134910](https://avatars.discourse-cdn.com/v4/letter/j/90ced4/32.png) [@jhn134910](https://discuss.elastic.co/u/jhn134910)
#### Post date: [April 4, 2017, 1:53pm UTC](https://discuss.elastic.co/t/problem-accessing-maven-repository-https-artifacts-elastic-co-maven/81130/3 "2017-04-04T13:53:22Z")

</div>

Thanks for your response David.  
What URL do I use for the mirror given the repo URL of [https://artifacts.elastic.co/maven](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](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](https://artifacts.elastic.co/downloads/packs/x-pack/x-pack-5.1.1.zip))?

---

<div class="post-metadata">

### Author: ![jhn134910](https://avatars.discourse-cdn.com/v4/letter/j/90ced4/32.png) [@jhn134910](https://discuss.elastic.co/u/jhn134910)
#### Post date: [April 4, 2017, 2:09pm UTC](https://discuss.elastic.co/t/problem-accessing-maven-repository-https-artifacts-elastic-co-maven/81130/4 "2017-04-04T14:09:57Z")

</div>

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>

```

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [May 2, 2017, 2:10pm UTC](https://discuss.elastic.co/t/problem-accessing-maven-repository-https-artifacts-elastic-co-maven/81130/5 "2017-05-02T14:10:01Z")

</div>

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