Spring 3.1.0.RC1 - which maven repository? - spring

As indicated on springsource Spring 3.1.0.RC1 has just been made available for download. On the same site it is said that it is available from maven using http://maven.springframework.org/milestone. I'm not sure what this url is supposed to be but it does not appear to be a (valid) maven repository.
Also, the Spring repository does not yet contain this version.
Anyone know if Spring 3.1.0.RC1 is available and in which maven repository?

The http://maven.springframework.org/milestone may not seem valid using HTTP browser, but it works.
Just do:
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>3.1.0.RC1</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>springsource-milestone</id>
<url>http://maven.springframework.org/milestone</url>
</repository>
</repositories>

On this Spring blog post they say that "The milestone and snapshot repositories are both hosted on Amazon's S3 service and as such the directory structure is not human-readable. To view the repositories in a human-readable format, use the S3Browse utility."
I haven't tried it myself yet, but this should work:
<repository>
<id>spring-milestone</id>
<name>Spring Portfolio Milestone Repository</name>
<url>http://s3.amazonaws.com/maven.springframework.org/milestone</url>
</repository>

I really like the repository browser at https://repo.springsource.org/webapp/artifactshome.html
Regards.

Related

mvn- look for wrong url in maven repositories

When I run mvn package to compile a maven project it downloads the jar file from
wrong URLs. It adds org/dnosproject/ to the URL which is wrong.
Downloading: https://mvnrepository.com/artifact/io.github.dnos-project/dnos-lib-all/org/dnosproject/onos-port-protobuf/1.1.5/onos-port-protobuf-1.1.5.jar
<repositories>
<repository>
<id>dnos-lib-all</id>
<name>dnos-lib</name>
<url>https://mvnrepository.com/artifact/io.github.dnos-project/dnos-lib-all</url>
<layout>default</layout>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>io.github.dnos-project</groupId>
<artifactId>dnos-lib-all</artifactId>
<version>1.1.5</version>
</dependency>
The website mvnrepository.com is a kind of search engine across multiple real Maven repositories. If you look at the link you mentioned in your <repository/> configuration, you'll notice they list that dependency as available in "Central", in fact here. "Central" is configured by default, so you don't need a <repository/> configuration for this dependency. Instead, you just need the correct <dependency/> entry:
<dependency>
<groupId>io.github.dnos-project</groupId>
<artifactId>dnos-lib-all</artifactId>
<version>1.1.5</version>
</dependency>
You already had this in the snippet you posted, so just removing the <repository/> configuration should do the trick.

maven.elasticsearch.org returning a 404

We are running into an issue with our Maven dependency on the Elastic Search Libraries that our code depends on in order to build / compile.
The build process fetched these libraries at build time, however the maven elastic search repository seems to be off line all together.
http://maven.elasticsearch.org/ currently returns a 404 resulting in everything below it being unavailable which results in the build process failing.
Even the maven central repo for elastic shield returns 404's https://repo.maven.apache.org/maven2/org/elasticsearch/plugin/shield/
I have sent an email to support#elastic.co asking them to turn the Elastic Repo back on, any other idea why this repo would just go offline and how would I go about rectifying it? A local onsite mirror of central, but it feels like overkill for what we need it for.
From the official document here
The repository URL is : https://artifacts.elastic.co/maven/org/elasticsearch/plugin/shield/2.4.6/shield-2.4.6.jar
If you are using maven:
<project ...>
<repositories>
<!-- add the elasticsearch repo -->
<repository>
<id>elasticsearch-releases</id>
<url>https://artifacts.elastic.co/maven</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
...
</repositories>
...
<dependencies>
<!-- add the shield jar as a dependency -->
<dependency>
<groupId>org.elasticsearch.plugin</groupId>
<artifactId>shield</artifactId>
<version>2.4.6</version>
</dependency>
...
</dependencies>
...
</project>

Maven spring-data-elasticsearch dependency Not Found

I have a spring boot app for which I want to use the dependency spring-data-elasticsearch. I'm using one of the latest version of Elasticsearch on my server (v5.4.x) so I had to use the latest snapshot of spring-data-elasticsearch (3.0.0.BUILD-SNAPSHOT).
According to the git page (link below) :
https://github.com/spring-projects/spring-data-elasticsearch/blob/master/README.md
I have to declare in my pom.xml a special repository where is located this specific version of the dependency, as you can see below :
<repositories>
<repository>
<id>spring-libs-snapshot</id>
<name>Spring Snapshot Repository</name>
<url>http://repo.spring.io/libs-snapshot</url>
</repository>
</repositories>
<dependencies>
<!-- ELK -->
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-elasticsearch</artifactId>
<version>3.0.0.BUILD-SNAPSHOT</version>
</dependency>
<!-- Spring -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<!-- MySQL -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
</dependencies>
But I have the following error on my pom.xml :
Missing artifact org.springframework.data:spring-data-elasticsearch:jar:3.0.0.BUILD-SNAPSHOT
Anyone knows where the problem is coming from please ? I'm pulling hairs out of my head since 2 hours.
Thank you !
You probably have to add the Spring snapshot repository to your pom.xml
<repositories>
<repository>
<id>repository.spring.snapshot</id>
<name>Spring Snapshot Repository</name>
<url>http://repo.spring.io/snapshot</url>
</repository>
</repositories>
Thanks for your replies but I'm feeling like a fool. In my company we work with a nexus where all the repos are deployed, so I had to add the informations about the repos in my nexus too.
Sorry for the inconvenience.

using a private github repository to host a private maven artifact

Question title kind of explains it all. I've seen other questions referencing this but I think they are more geared towards the github repository being public. Using this configuration in the dependent project works when the repository is public:
<repositories>
<repository>
<id>company-core-mvn-repo</id>
<url>https://raw.github.com/company/company-core/mvn-repo/</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.company.core</groupId>
<artifactId>company-core</artifactId>
<version>1.1</version>
</dependency>
</dependencies>
But not when I change the settings to private. I was hoping someone could eplicitly tell me that this isn't possible before I try another approach. It seems strange that the dependency has no issues publishing to github yet I can't find a configuration that will allow the dependent package to pull it down.

Zoho Java library

I found this link for Zoho Java library:
https://github.com/zoho/projects-java-wrappers
<dependency>
<groupId>com.zoho.projects</groupId>
<artifactId>projects-java</artifactId>
<version>1.0</version>
</dependency>
Where I can find public repository where this jar file is hosted?
It seems there is no public repository for the project. Here Hosting a Maven repository on github you can read more about github as maven repository.
I chosen a JitPack approach and I checked that solution described on https://jitpack.io/#zoho/projects-java-wrappers/ac2b31602f works.
JitPack is kind of self release maven repository
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
and
<dependency>
<groupId>com.github.zoho</groupId>
<artifactId>projects-java-wrappers</artifactId>
<version>ac2b31602f</version>
</dependency>

Resources