# Initial Maven Repo

**URL:** <https://discuss.elastic.co/t/initial-maven-repo/2885>\
**Category:** Elasticsearch\
**Created:** [April 2, 2010, 6:27pm UTC](https://discuss.elastic.co/t/initial-maven-repo/2885 "2010-04-02T18:27:26Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [April 2, 2010, 6:27pm UTC](https://discuss.elastic.co/t/initial-maven-repo/2885/1 "2010-04-02T18:27:26Z")

</div>

HI,

There is a maven snapshot repo located here:  
[http://oss.sonatype.org/content/repositories/snapshots/](http://oss.sonatype.org/content/repositories/snapshots/) that you can use. I  
have just pushed elasticsearch 0.6.0 SNAPSHOT there. When 0.6.0 will be  
released, the release maven repo will be:  
[http://oss.sonatype.org/content/repositories/releases/](http://oss.sonatype.org/content/repositories/releases/) (no central sync for  
now...).

Can you please test the snapshots one and see if its ok? And maybe a more  
maven experts than myself can validate the pom looks good (would love  
someone to get a second glance on the dependencies section).

-shay.banon

---

<div class="post-metadata">

**Author:** ![Paolo\_Castagna](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/paolo_castagna/32/3347_2.png) [@Paolo\_Castagna](https://discuss.elastic.co/u/Paolo_Castagna)\
**Post date:** [April 2, 2010, 7:08pm UTC](https://discuss.elastic.co/t/initial-maven-repo/2885/2 "2010-04-02T19:08:19Z")

</div>

Shay Banon wrote:

> Can you please test the snapshots one and see if its ok? And maybe a  
> more maven experts than myself can validate the pom looks good (would  
> love someone to get a second glance on the dependencies section).

Hi Shay,  
thanks. At a first glance I do not see problems.

Maven users can simply put this in their pom.xml:

```
 <dependency>
   <groupId>org.elasticsearch</groupId>
   <artifactId>elasticsearch</artifactId>
   <version>0.6.0-SNAPSHOT</version>
 </dependency>

```

[...]

```
 <repository>
   <id>sonatype-snapshots</id>
   <name>Sonatype Snapshots Repository</name>
   <url>http://oss.sonatype.org/content/repositories/snapshots/</url>
   <snapshots>
     <enabled>true</enabled>
   </snapshots>
 </repository>

 <repository>
   <id>sonatype-releases</id>
   <name>Sonatype Releases Repository</name>
   <url>http://oss.sonatype.org/content/repositories/releases/</url>
 </repository>

```

These are the dependencies:

- org.elasticsearch:elasticsearch:jar:0.6.0-SNAPSHOT:compile  
+- org.slf4j:slf4j-api:jar:1.5.8:compile  
+- com.google.inject.extensions:guice-multibindings:jar:2.0:compile  
+- org.codehaus.jackson:jackson-core-asl:jar:1.5.0:compile  
+- org.apache.lucene:lucene-fast-vector-highlighter:jar:3.0.1:compile  
+- org.apache.lucene:lucene-analyzers:jar:3.0.1:compile  
+- jgroups:jgroups:jar:2.9.0.GA:runtime  
+- com.google.inject.extensions:guice-assisted-inject:jar:2.0:compile  
+- com.google.inject:guice:jar:2.0:compile  
+- com.google.collections:google-collections:jar:1.0:compile  
+- aopalliance:aopalliance:jar:1.0:compile  
+- org.apache.lucene:lucene-core:jar:3.0.1:compile  
+- org.apache.lucene:lucene-queries:jar:3.0.1:compile  
+- org.jboss.netty:netty:jar:3.1.5.GA:runtime  
+- org.codehaus.jackson:jackson-mapper-asl:jar:1.5.0:compile  
- joda-time:joda-time:jar:1.6:compile

Now, I am not sure... but there is one additional jar in the  
Elasticsearch distribution (at least, v0.5.1):

- jline-0.9.94.jar

Could this be a problem?

Then, as usual, when SLF4J is used, Maven users (but also Ivy, etc.)  
need to chose their logging framework at deployment time.  
With Maven you can put this in their pom.xml:

```
 <dependency>
   <groupId>org.slf4j</groupId>
   <artifactId>slf4j-log4j12</artifactId>
   <optional>true</optional>
   <version>1.5.8</version>
 </dependency>

 <dependency>
   <groupId>log4j</groupId>
   <artifactId>log4j</artifactId>
   <version>1.2.15</version>
   <optional>true</optional>
   <exclusions>
     <exclusion>
       <groupId>javax.jms</groupId>
       <artifactId>jms</artifactId>
     </exclusion>
     <exclusion>
       <groupId>com.sun.jdmk</groupId>
       <artifactId>jmxtools</artifactId>
     </exclusion>
     <exclusion>
       <groupId>com.sun.jmx</groupId>
       <artifactId>jmxri</artifactId>
     </exclusion>
     <exclusion>
       <groupId>javax.mail</groupId>
       <artifactId>mail</artifactId>
     </exclusion>
   </exclusions>
 </dependency>

 [...]

```

As expected, if someone try to have the Maven Eclipse plugin download  
the sources using:

mvn eclipse:eclipse -DdownloadSources=true

They will see this message:

"Sources for some artifacts are not available.  
List of artifacts without a source archive:  
o org.elasticsearch:elasticsearch:0.6.0-20100402.181319-2"

I am trying to see if there is a workaround (other than fixing  
the .classpath manually).

Thanks again, well done!  
Paolo

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [April 2, 2010, 7:26pm UTC](https://discuss.elastic.co/t/initial-maven-repo/2885/3 "2010-04-02T19:26:50Z")

</div>

Hi,

Great, and thanks for the effort!. I will check also if I can easily  
generate javadoc and source jars as well just for the maven case. The jline  
thingy is not required, its what I use to output log level in colors when  
running the server from the command line.

cheers,  
shay.banon

On Fri, Apr 2, 2010 at 10:08 PM, Paolo Castagna \<  
[castagna.lists@googlemail.com](mailto:castagna.lists@googlemail.com)\> wrote:

> Shay Banon wrote:
> 
> > Can you please test the snapshots one and see if its ok? And maybe a  
> > more maven experts than myself can validate the pom looks good (would love  
> > someone to get a second glance on the dependencies section).
> 
> Hi Shay,  
> thanks. At a first glance I do not see problems.
> 
> Maven users can simply put this in their pom.xml:
> 
> org.elasticsearch elasticsearch 0.6.0-SNAPSHOT 
> 
> [...]
> 
> sonatype-snapshots Sonatype Snapshots Repository http://oss.sonatype.org/content/repositories/snapshots/ true sonatype-releases Sonatype Releases Repository http://oss.sonatype.org/content/repositories/releases/ 
> 
> These are the dependencies:
> 
> - org.elasticsearch:elasticsearch:jar:0.6.0-SNAPSHOT:compile  
> +- org.slf4j:slf4j-api:jar:1.5.8:compile  
> +- com.google.inject.extensions:guice-multibindings:jar:2.0:compile  
> +- org.codehaus.jackson:jackson-core-asl:jar:1.5.0:compile  
> +- org.apache.lucene:lucene-fast-vector-highlighter:jar:3.0.1:compile  
> +- org.apache.lucene:lucene-analyzers:jar:3.0.1:compile  
> +- jgroups:jgroups:jar:2.9.0.GA:runtime  
> +- com.google.inject.extensions:guice-assisted-inject:jar:2.0:compile  
> +- com.google.inject:guice:jar:2.0:compile  
> +- com.google.collections:google-collections:jar:1.0:compile  
> +- aopalliance:aopalliance:jar:1.0:compile  
> +- org.apache.lucene:lucene-core:jar:3.0.1:compile  
> +- org.apache.lucene:lucene-queries:jar:3.0.1:compile  
> +- org.jboss.netty:netty:jar:3.1.5.GA:runtime  
> +- org.codehaus.jackson:jackson-mapper-asl:jar:1.5.0:compile  
> - joda-time:joda-time:jar:1.6:compile
> 
> Now, I am not sure... but there is one additional jar in the  
> Elasticsearch distribution (at least, v0.5.1):
> 
> - jline-0.9.94.jar
> 
> Could this be a problem?
> 
> Then, as usual, when SLF4J is used, Maven users (but also Ivy, etc.)  
> need to chose their logging framework at deployment time.  
> With Maven you can put this in their pom.xml:
> 
> org.slf4j slf4j-log4j12 true 1.5.8 log4j log4j 1.2.15 true javax.jms jms com.sun.jdmk jmxtools com.sun.jmx jmxri javax.mail mail 
> 
> [...]
> 
> As expected, if someone try to have the Maven Eclipse plugin download  
> the sources using:
> 
> mvn eclipse:eclipse -DdownloadSources=true
> 
> They will see this message:
> 
> "Sources for some artifacts are not available.  
> List of artifacts without a source archive:  
> o org.elasticsearch:elasticsearch:0.6.0-20100402.181319-2"
> 
> I am trying to see if there is a workaround (other than fixing  
> the .classpath manually).
> 
> Thanks again, well done!  
> Paolo

---

<div class="post-metadata">

**Author:** ![HubertChang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hubertchang/32/3352_2.png) [@HubertChang](https://discuss.elastic.co/u/HubertChang)\
**Post date:** [April 2, 2010, 7:30pm UTC](https://discuss.elastic.co/t/initial-maven-repo/2885/4 "2010-04-02T19:30:40Z")

</div>

What are the isolated jars dependencies for Java API Client? Now I just put all the jars under libs into my client application. :).

---

<div class="post-metadata">

**Author:** ![Paolo\_Castagna](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/paolo_castagna/32/3347_2.png) [@Paolo\_Castagna](https://discuss.elastic.co/u/Paolo_Castagna)\
**Post date:** [April 2, 2010, 7:48pm UTC](https://discuss.elastic.co/t/initial-maven-repo/2885/5 "2010-04-02T19:48:40Z")

</div>

Hi Hubert,  
I asked the same questions a few days ago: you need all the jars. See:  
[http://groups.google.com/a/elasticsearch.com/group/users/browse\_thread/thread/5f15a8e16fd0d59d/5c1e834e6bcbca42](http://groups.google.com/a/elasticsearch.com/group/users/browse_thread/thread/5f15a8e16fd0d59d/5c1e834e6bcbca42)

Paolo

HubertChang wrote:

> What are the isolated jars dependencies for Java API Client? Now I just put  
> all the jars under libs into my client application. :).

---

<div class="post-metadata">

**Author:** ![Phil\_Hagelberg\_2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/phil_hagelberg_2/32/3344_2.png) [@Phil\_Hagelberg\_2](https://discuss.elastic.co/u/Phil_Hagelberg_2)\
**Post date:** [April 15, 2010, 9:14pm UTC](https://discuss.elastic.co/t/initial-maven-repo/2885/6 "2010-04-15T21:14:12Z")

</div>

On Apr 2, 11:27 am, Shay Banon [shay.ba...@elasticsearch.com](mailto:shay.ba...@elasticsearch.com) wrote:

> There is a maven snapshot repo located here:[http://oss.sonatype.org/content/repositories/snapshots/that](http://oss.sonatype.org/content/repositories/snapshots/that) you can use. I  
> have just pushed elasticsearch 0.6.0 SNAPSHOT there. When 0.6.0 will be  
> released, the release maven repo will be:[Central Repository:](http://oss.sonatype.org/content/repositories/releases/)(no central sync for  
> now...).
> 
> Can you please test the snapshots one and see if its ok? And maybe a more  
> maven experts than myself can validate the pom looks good (would love  
> someone to get a second glance on the dependencies section).

The only problem I noticed was that it depends on versions of jgroups  
and netty that aren't available in the public repos. So I had to add  
both the sonatype repo and another jboss repo before it would work for  
me. Generally it's pretty discouraged to depend on jars that aren't in  
either mvn central or your own custom repo, so this should either be  
changed or better-documented.

-Phil

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [April 16, 2010, 10:03am UTC](https://discuss.elastic.co/t/initial-maven-repo/2885/7 "2010-04-16T10:03:36Z")

</div>

Good note, I will document that.

On Fri, Apr 16, 2010 at 12:14 AM, Phil Hagelberg [phil@hagelb.org](mailto:phil@hagelb.org) wrote:

> On Apr 2, 11:27 am, Shay Banon [shay.ba...@elasticsearch.com](mailto:shay.ba...@elasticsearch.com) wrote:
> 
> > There is a maven snapshot repo located here:  
> > [http://oss.sonatype.org/content/repositories/snapshots/that](http://oss.sonatype.org/content/repositories/snapshots/that) you can use. I  
> > have just pushed elasticsearch 0.6.0 SNAPSHOT there. When 0.6.0 will be  
> > released, the release maven repo will be:  
> > [Central Repository:](http://oss.sonatype.org/content/repositories/releases/)(no central sync for  
> > now...).
> > 
> > Can you please test the snapshots one and see if its ok? And maybe a  
> > more  
> > maven experts than myself can validate the pom looks good (would love  
> > someone to get a second glance on the dependencies section).
> 
> The only problem I noticed was that it depends on versions of jgroups  
> and netty that aren't available in the public repos. So I had to add  
> both the sonatype repo and another jboss repo before it would work for  
> me. Generally it's pretty discouraged to depend on jars that aren't in  
> either mvn central or your own custom repo, so this should either be  
> changed or better-documented.
> 
> -Phil

---

<div class="post-metadata">

**Author:** ![Paolo\_Castagna](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/paolo_castagna/32/3347_2.png) [@Paolo\_Castagna](https://discuss.elastic.co/u/Paolo_Castagna)\
**Post date:** [April 16, 2010, 10:11am UTC](https://discuss.elastic.co/t/initial-maven-repo/2885/8 "2010-04-16T10:11:27Z")

</div>

Hi Phil,  
you are right!

I didn't spot the problem, since I had already the dependencies in  
my local Maven repo.

So, this would be the section in the pom.xml file, right?

```
 <repository>
   <id>sonatype-snapshots</id>
   <name>Sonatype Snapshots Repository</name>
   <url>http://oss.sonatype.org/content/repositories/snapshots/</url>
   <snapshots>
     <enabled>true</enabled>
   </snapshots>
 </repository>

 <repository>
   <id>sonatype-releases</id>
   <name>Sonatype Releases Repository</name>
   <url>http://oss.sonatype.org/content/repositories/releases/</url>
 </repository>

 <repository>
   <id>jboss-repo</id>
   <name>JBoss Maven Repository</name>
   <url>http://repository.jboss.com/maven2/</url>
 </repository>

```

Paolo

Phil Hagelberg wrote:

> On Apr 2, 11:27 am, Shay Banon [shay.ba...@elasticsearch.com](mailto:shay.ba...@elasticsearch.com) wrote:
> 
> > There is a maven snapshot repo located here:[http://oss.sonatype.org/content/repositories/snapshots/that](http://oss.sonatype.org/content/repositories/snapshots/that) you can use. I  
> > have just pushed elasticsearch 0.6.0 SNAPSHOT there. When 0.6.0 will be  
> > released, the release maven repo will be:[Central Repository:](http://oss.sonatype.org/content/repositories/releases/)(no central sync for  
> > now...).
> > 
> > Can you please test the snapshots one and see if its ok? And maybe a more  
> > maven experts than myself can validate the pom looks good (would love  
> > someone to get a second glance on the dependencies section).
> 
> The only problem I noticed was that it depends on versions of jgroups  
> and netty that aren't available in the public repos. So I had to add  
> both the sonatype repo and another jboss repo before it would work for  
> me. Generally it's pretty discouraged to depend on jars that aren't in  
> either mvn central or your own custom repo, so this should either be  
> changed or better-documented.
> 
> -Phil

---

<div class="post-metadata">

**Author:** ![Phil\_Hagelberg\_2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/phil_hagelberg_2/32/3344_2.png) [@Phil\_Hagelberg\_2](https://discuss.elastic.co/u/Phil_Hagelberg_2)\
**Post date:** [April 16, 2010, 4:37pm UTC](https://discuss.elastic.co/t/initial-maven-repo/2885/9 "2010-04-16T16:37:02Z")

</div>

On Fri, Apr 16, 2010 at 3:11 AM, Paolo Castagna  
[castagna.lists@googlemail.com](mailto:castagna.lists@googlemail.com) wrote:

> I didn't spot the problem, since I had already the dependencies in  
> my local Maven repo.
> 
> So, this would be the section in the pom.xml file, right?

Yeah, that worked for me. Thanks.

-Phil

---

<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, 4:24am UTC](https://discuss.elastic.co/t/initial-maven-repo/2885/10 "2017-07-06T04:24:35Z")

</div>


