Maven Repositories for Spring Roo - maven

My intent is to proxy Roo Maven repository with my local Nexus installation, so that it will contain Roo 1.2.0.RELEASE packages.
On http://static.springsource.org/spring-roo/reference/html/resources.html it is written that Roo builds are published on http://spring-roo-repository.springsource.org/release.
Unfortunately that link returns error NoSuchKey.
Is there some other Maven repository to get Roo packages from ?

Based on this Nexus ticket I solved my problem by:
create Proxy on Nexus for http://spring-roo-repository.springsource.org/release
add this repository into default "Public Repositories" group
Nexus will proxy requested artifacts and it will crate index of this artifacts, but it is not able to index the whole http://spring-roo-repository.springsource.org/release repository, because its index is not published. The reason of this problem is that it is hosted on Amazon S3 storage.

Create (in Nexus) a proxy repository with the remote storage location = http://spring-roo-repository.springsource.org/release
Then, add it to the public repositories group.

Related

Sonatype Nexus can't index IBM Maven repository

We're trying to proxy the IBM Maven repository on our company internal Sonatype Nexus. We added the repository address but the repo has not been populated even under direct request.
The Sonatype nexus' "Browse Index" tab is empty whereas the "Browse Remote" correctly shows the library tree. But when adding dependecies to a project's pom.xml file, the IDE says it cannot find the archetypes and the artifacts.
Is the IBM repository indexed? Is there something we're missing? We are using IBM RAD 9.5 and Sonatype Nexus™ 2.11.4-01
Many Maven repositories do not publish search indexes, they are entirely optional, and only used to support interactive search. They are not used by Maven for artifact retrieval. To see if the remote publishes a search index try retrieving ".index/nexus-maven-repository-index.properties" from it.
If Maven cont' download artifacts from the repository see here for information on how to diagnose the issue:
https://support.sonatype.com/hc/en-us/articles/213464518-Troubleshooting-Artifact-Download-Failures
Again, artifact download failures have nothing to do with search indexes.

health check of custom repositories in Nexus?

I have created a repository in Nexus. As I am the owner of this repository, it is of type : Hosted.
I was going through the book of Mastering Apache Maven 3.0 and it says that, it is not possible to perform a health check on the repositories which are
1.The Repository Type is Proxy.
2.The Repository Policy is not Snapshot.
3.The Repository is In Service.
I have the last 2 conditions satisfied in my repository. But, the type of my repository is Hosted as I have the repository in my local machine.
Is there anything which I can do for a health check of custom repositories in Nexus?
I have one more question. If I want to mark an artifact in my hosted repository, how should I do that? Or should I just delete the vulnerable artifact from the repository?
Thanks in Advance!
How could nexus perform a health check on your custom libs?
From the nexus docs
HDS exposes data about the components in the Central Repository and
other public repositories, including license information, security
vulnerability data, and other statistics like relative usage
popularity and age
HDS is
Hosted Data Services (HDS) run by Sonatype
None of that is available for your hosted custom libraries. You can't really expect sonatype to maintain a database about them, because it doesn't know about them. If you want this, move your libs to an open-source model with an appropriate licence and upload them to maven central.

How to update Nexus index of SpringSource repository

I added two SpringSource repositories to my Nexus instance
http://repository.springsource.com/maven/bundles/release
http://repository.springsource.com/maven/bundles/external
Configuration looks fine but I noticed that the index is always empty. So it is not possible to resolved depedencies for artifacts in this repository.
I can use Browse Remote to navigate to the artifact. So the artifact I need is in the repository but without an index, this is of no use it seems.
Also when I use search in Nexus I cannot find the artifact.
Why is there no index for these repositories?
How should these repositories be used?
These repositories do not publish search indexes, you can test for this by trying to retrieve "/.index/nexus-maven-repository-index.properties" through them:
http://repository.springsource.com/maven/bundles/release/.index/nexus-maven-repository-index.properties
Search indexes are an optional repository feature, they are not needed for artifact retrieval, they are used to support interactive search in UI's such as Nexus and m2Eclipse. Nexus will be able to pull artifacts from these repositories without issue, and as artifacts are downloaded they will be added to the local search indexes.

Issue with imported scope poms (spring bom io dependency issue)

My company policy restricts us from downloading thirdparty artifacts from public repositories (maven_central, spring-io etc)
We use Nexus as a repository manager which hosts all the artifacts that are approved by our company policy.
We are trying to use io-platform bom pom in our project to manage all spring dependencies.
We have uploaded all boms and its dependencies in our company repository. Verified also, everything is there in the company repos.
In my settings.xml all repositories (hosted by company) are properly mentioned.
But somehow for spring-framework-bom project maven searches only in central even if it is disabled in settings.xml.It should ideally search in our company repositories first.
We are getting the below exception.
Exception trace:
org.apache.maven.reactor.MavenExecutionException: POM 'org.springframework:spring-framework-bom' not found in repository: Unable to download the artifact from any repository org.springframework:spring-framework-bom:pom:4.0.6.RELEASE
from the specified remote repositories:
central (http://repo1.maven.org/maven2)
This problem comes when you have pom/artifact defined with import scope in your other pom.
Imported dependencies basically looses repository information and they try to search dependencies in maven central .
Trick is to mirror maven central repository with your companies repository. So in case of imported dependency it will search in companies repository rather than default maven central.
Hope this helps.
It's a bug. This is the proposed solution:
IMO, using the stated workaround (adding the custom repository to the POM that has the scope == import dependency) is probably the safest way to go
It works at least in Maven 3.3.9. Probably already earlier.

Nexus proxy repository

I'm new to Nexus. I have added a proxy repository for http://reflections.googlecode.com/svn/repo/. Its added successfully. I can browse the repository content in the 'Browse remote' tab. But when I point my maven to my local Nexus mirror & execute it fails while accessing dependency for reflections, its not able to locate it in my nexus repository.
If you added the repository as a proxy repository in Nexus do not forget to add the proxy to the Repository Group which you use as mirror for all Nexus requests (public/snapshot) - assumed you have this kind of configuration.
(Took this from a former answer from me.)
Do you try to access the proxy directly?
I think it is better to create a group repository and add the Google repository there.

Resources