How can I get nexus to proxy springsource maven repository on s3?

十年热恋 提交于 2019-12-22 08:52:52

问题


I have nexus 1.5.0 setup to proxy springsource repositories but it's not working. The repositories are on s3 that nexus doesn't seem to understand how to deal with that.

What's the right pattern?

Here are the repositories I'm told I need, but I cannot access the maven paths with in them

http://repository.springsource.com/maven/bundles/release http://repository.springsource.com/maven/bundles/external

Do, I need to mirror these locally?


回答1:


According to NEXUS-1121, your version of Nexus knows how to deal with S3 based repositories. Below, Eugene's comment:

Here is Nexus setup that works for me:

  • Configured "proxy" repository for http://repository.springsource.com/maven/bundles/release
  • Configured "proxy" repository for http://repository.springsource.com/maven/bundles/external
  • Added both of those repositories into default "Public Repositories" group

After that I am able to download artifacts from those repositories as if they are in Maven Central repository.

The only issue is that you can only search trough artifacts that been proxied, because there is no Nexus index published on those repositories. It should be easy to publish index and instructions for using standalone indexer can be found at http://docs.codehaus.org/display/M2ECLIPSE/Nexus+Indexer#NexusIndexer-indexer




回答2:


It works for me with this configuration and with another repository.

I have a Sonatype Nexus repository version 1.9.1.1. I wanted to configure the repositories to download artifacts from http://maven.springframework.org/milestone/.

I have created a new proxy repository with this configuration:

id: repository.springframework.maven.milestone
Name: Spring Maven Milestone Repository
Rep. Type: proxy
Provider: Maven2
Format: Maven2
Rep Policy: Release
Remote storage: http://maven.springframework.org/milestone/
Down. Remote indexes: false
Auto blocking: true
File validation: False
Checksum: warm.

I saved the data and the repository was created.

The strange thing is that when i try to use the "browse Remote" tab I can't list anything.

Important: After that I clicked on Public Repositories / Configuration and added the Spring Maven Milestone Repository to the ordered group repositories.

And finally, I wrote the dependency in my POM archive:

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

And it was downloaded without problems.

I hope it will be useful.



来源:https://stackoverflow.com/questions/2625553/how-can-i-get-nexus-to-proxy-springsource-maven-repository-on-s3

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!