Initial Maven Repo


(Shay Banon) #1

HI,

There is a maven snapshot repo located here:
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/ (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


(Paolo Castagna) #2

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


(Shay Banon) #3

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> 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


(HubertChang) #4

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


(Paolo Castagna) #5

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

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. :).


(Phil Hagelberg-2) #6

On Apr 2, 11:27 am, Shay Banon shay.ba...@elasticsearch.com wrote:

There is a maven snapshot repo located here: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/(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


(Shay Banon) #7

Good note, I will document that.

On Fri, Apr 16, 2010 at 12:14 AM, Phil Hagelberg phil@hagelb.org wrote:

On Apr 2, 11:27 am, Shay Banon shay.ba...@elasticsearch.com wrote:

There is a maven snapshot repo located here:
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/(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


(Paolo Castagna) #8

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 wrote:

There is a maven snapshot repo located here: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/(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


(Phil Hagelberg-2) #9

On Fri, Apr 16, 2010 at 3:11 AM, Paolo Castagna
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


(system) #10