Question

I clone repository from https://github.com/spring-projects/spring-data-elasticsearch/blob/master/pom.xml

In pom.xml I have:

<dependency>
    <groupId>org.springframework.data</groupId>
    <artifactId>spring-data-elasticsearch</artifactId>
    <version>1.0.0.M2</version>
</dependency>

but maven can not find this lib in repository. I also try: https://github.com/spring-projects/spring-data-elasticsearch but it is the same spring-data-elasticsearch version.

Was it helpful?

Solution

I'm assuming you're using Maven Central as your repository. I didn't see it there either.

According to the project site, spring-data-elasticsearch is available at http://repo.spring.io/libs-milestone. Did you try this repo?

OTHER TIPS

Try to use the following repository.

<repositories>
            <repository>
                <id>spring-snapshot</id>
                <name>Spring Maven SNAPSHOT Repository</name>
                <url>http://repo.springsource.org/libs-snapshot</url>
            </repository>
</repositories>

Dependency

<dependency>
  <groupId>org.springframework.data</groupId>
  <artifactId>spring-data-elasticsearch</artifactId>
  <version>1.0.0.M1</version>
</dependency>

I try once again after few hours and It works. Seriously I have no idea why. Correct configuration is:

<dependency>
    <groupId>org.springframework.data</groupId>
    <artifactId>spring-data-elasticsearch</artifactId>
    <version>1.0.0.RC1</version>
</dependency>

<repository>
  <id>spring-libs-milestone</id>
  <name>Spring Milestone Repository</name>
  <url>http://repo.spring.io/libs-milestone</url>
</repository>

I am not understanding where is the confusion here ?

Project is not yet fully released hence it's still using milestone repo of springsource instead of maven central repo. It will get released within 2 weeks with Spring Data release train Dijkstra.

Spring Data Elasticsearch GitHub page stats that

Maven configuration

Add the Maven dependency:

  <dependency>
    <groupId>org.springframework.data</groupId>
    <artifactId>spring-data-elasticsearch</artifactId>
    <version>1.0.0.RC1</version>
  </dependency>

  <repository>
    <id>spring-libs-milestone</id>
    <name>Spring Milestone Repository</name>
    <url>http://repo.spring.io/libs-milestone</url>
  </repository>

If you'd rather like the latest snapshots of the upcoming major version, use our Maven snapshot repository and declare the appropriate dependency version.

  <dependency>
    <groupId>org.springframework.data</groupId>
    <artifactId>spring-data-elasticsearch</artifactId>
    <version>1.0.0.BUILD-SNAPSHOT</version>
 </dependency>

 <repository>
   <id>spring-libs-snapshot</id>
   <name>Spring Snapshot Repository</name>
   <url>http://repo.spring.io/libs-snapshot</url>
 </repository>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top