# \[dev\] building elasticsearch - maven issues

**URL:** <https://discuss.elastic.co/t/dev-building-elasticsearch-maven-issues/22235>\
**Category:** Elasticsearch\
**Created:** [February 18, 2015, 11:57am UTC](https://discuss.elastic.co/t/dev-building-elasticsearch-maven-issues/22235 "2015-02-18T11:57:57Z")\
**Posts on this page:** 2\
**Page:** 1

<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:** [February 18, 2015, 11:57am UTC](https://discuss.elastic.co/t/dev-building-elasticsearch-maven-issues/22235/1 "2015-02-18T11:57:57Z")

</div>

Dear contributors (if you are elasticsearch user, you can skip this email),

A commit was push yesterday which changes the names of the maven repositories in the elasticsearch pom file. When you sync to the latest on the master branch you may find that your maven build errors with the following:

[ERROR] Failed to execute goal on project elasticsearch: Could not resolve dependencies for project org.elasticsearch:elasticsearch:jar:2.0.0-SNAPSHOT: Failed to collect dependencies at org.apache.lucene:lucene-test-framework:jar:5.1.0-snapshot-1657571: Failed to read artifact descriptor for org.apache.lucene:lucene-test-framework:jar:5.1.0-snapshot-1657571: Could not transfer artifact org.apache.lucene:lucene-test-framework:pom:5.1.0-snapshot-1657571 from/to lucene-snapshots ([https://download.elasticsearch.org/lucenesnapshots/1657571](https://download.elasticsearch.org/lucenesnapshots/1657571) [https://download.elasticsearch.org/lucenesnapshots/1657571](https://download.elasticsearch.org/lucenesnapshots/1657571)): Access denied to: [https://download.elasticsearch.org/lucenesnapshots/1657571/org/apache/lucene/lucene-test-framework/5](https://download.elasticsearch.org/lucenesnapshots/1657571/org/apache/lucene/lucene-test-framework/5).. [https://download.elasticsearch.org/lucenesnapshots/1657571/org/apache/lucene/lucene-test-framework/5..](https://download.elasticsearch.org/lucenesnapshots/1657571/org/apache/lucene/lucene-test-framework/5..)., ReasonPhrase: Forbidden. -\> [Help 1]

This is caused by this commit [https://github.com/elasticsearch/elasticsearch/commit/3c2414128c6940b2b08ba2628190b1dec8aaa000](https://github.com/elasticsearch/elasticsearch/commit/3c2414128c6940b2b08ba2628190b1dec8aaa000) which basically tries to solve a Maven issue (MNG-5185 [https://jira.codehaus.org/browse/MNG-5185](https://jira.codehaus.org/browse/MNG-5185)) you can hit if you try to build also plugins.

If you have trouble to compile elasticsearch or a plugin using `mvn compile` and hit a `Access denied to: [URL_HERE], ReasonPhrase: Forbidden. -> [Help 1]`, you can remove related maven files:

find ~/.m2/repository -name \_remote.repositories -exec rm -v {} ;  
find ~/.m2/repository -name \_maven.repositories -exec rm -v {} ;

Another option is to tell Maven not using those files with --llr:

mvn compile --llr  
Note that the later is only a temporary fix.

## I hope this will help.

David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr [https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr) | @scrutmydocs [https://twitter.com/scrutmydocs](https://twitter.com/scrutmydocs)

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/C55FCCE3-2291-4684-9CED-F86F7A885D72%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/C55FCCE3-2291-4684-9CED-F86F7A885D72%40pilato.fr).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [July 6, 2017, 12:31am UTC](https://discuss.elastic.co/t/dev-building-elasticsearch-maven-issues/22235/2 "2017-07-06T00:31:56Z")

</div>


