2012-06-25 2 views
6

versions:use-releases을 사용하려고하면 내 릴리스 리포지토리가 "사용 안 함"으로 표시됩니다. 즉, 스냅 숏 종속성이 릴리스로 해결되지 않음을 의미합니다. 저장소가 사용 중지 된 것으로 간주되는 이유를 이해할 수 없습니다.Maven 버전 플러그인 업데이트 확인 건너 뛰기

[DEBUG] (f) remoteArtifactRepositories = [  id: snapshots 
     url: http://maven.live.hostname.net/content/repositories/snapshots/ 
    layout: default 
snapshots: [enabled => true, update => daily] 
releases: [enabled => true, update => daily] 
,  id: company-nexus 
     url: http://maven.live.hostname.net/content/groups/public/ 
    layout: default 
snapshots: [enabled => false, update => daily] 
releases: [enabled => true, update => daily] 
] 
[...] 
[DEBUG] Looking for a release of promotion-test-central:promotion-test-central:jar:1.6.0-SNAPSHOT 
[INFO] artifact promotion-test-central:promotion-test-central: checking for updates from snapshots 
[DEBUG] Reading resolution-state from: /home/tester/.m2/repository/promotion-test-central/promotion-test-central/resolver-status.properties 
[DEBUG] Writing resolution-state to: /home/tester/.m2/repository/promotion-test-central/promotion-test-central/resolver-status.properties 
[DEBUG] Skipping update check for artifact promotion-test-central:promotion-test-central (/home/tester/.m2/repository/promotion-test-central/promotion-test-central/maven-metadata-company-nexus.xml) from disabled repository company-nexus (http://hostname/content/groups/public/) 

내가 우리 넥서스 인스턴스에 central에 요청을 반영하고, 또한 너무 글로벌 스냅 샷 저장소를 지정하는 설치 프로그램을 실행 : 여기

빌드에서 단축 디버그 출력

<mirrors> 
     <mirror> 
      <id>mendeley-nexus</id> 
      <mirrorOf>central</mirrorOf> 
      <url>http://maven.live.chonp.net/content/groups/public/</url> 
     </mirror> 
    </mirrors> 
    <profiles> 
     <profile> 
      <id>default</id> 
      <repositories> 
       <repository> 
        <id>snapshots</id> 
        <url>http://maven.live.chonp.net/content/repositories/snapshots/</url> 
        <snapshots> 
         <enabled>true</enabled> 
        </snapshots> 
       </repository> 
      </repositories> 
     </profile> 
    </profiles> 
    <activeProfiles> 
     <activeProfile>default</activeProfile> 
    </activeProfiles> 

해당 종속성의 릴리스 및 스냅 샷 버전이 있으며 저장소는 다른 모든 측면에서 예상대로 정확하게 작동합니다.

+0

@ZnArK - XML ​​구문 강조는 어떻게 수행합니까? –

+0

xml에 대한 주석을 추가해야합니다. 그래서 prettify를 사용합니다. 다음은 README http://google-code-prettify.googlecode.com/svn/trunk/README입니다. html 이것은 위대한 리소스입니다. http://meta.stackexchange.com/a/75019/187632 – ZnArK

+0

위와 똑같은 문제가있어이 답변이 완벽하게 작동했습니다. –

답변

3

settings.xml 파일은 as documented in the Nexus book으로 구성되어야합니다. Maven의 super pom을 부분적으로 만 무시하기 때문에 구성이 작동하지 않습니다.

+1

죄송합니다. 그러나 이것은별로 의미가 없습니다. 물론 스냅 샷과 릴리즈 모두에 대한 단일 저장소를 넥서스 프로파일에서 사용할 수 있다면 작동 할 것입니다. 그런데 왜 내가 그렇게해야합니까? 스냅 샷 저장소에서만 릴리스를 찾는 점은 무엇입니까? – Uberto

+1

요점은 공개 그룹으로 EVERTHING (릴리스 및 스냅 샷)을 미러링하고 있으며이를 사용 가능하게 설정해야한다는 것입니다. 물론 스냅 샷을 사용하고 싶지 않으면 ... –

+1

이상 적으로 스냅 샷을 공용 저장소에서 지우고 싶습니다. 그렇지 않으면 왜 2 리포지토리가 있어야합니까? 어쨌든 여기서 문제는 스냅 샷 저장소에서 릴리스를 찾는 것과 반대입니다. 내가 이해할 수있는 것은, Maven 녀석들이 스냅 샷 repo가 ​​모든 것을 * 더하기 * 스냅 샷이 아닌 스냅 샷 만 유지하도록한다는 것입니다. 조금 더 명확하게 문서화 되었다면 나에게도 괜찮습니다. – Uberto

1

나는 또한 이것에 부딪쳤다.

<repository> 
     <id>my-snapshots</id> 
     <url>https://nexus.corp.company.com/nexus/content/repositories/snapshots</url> 
     <snapshots> 
      <enabled>true</enabled> 
     </snapshots> 
     <releases> 
      <enabled>true</enabled> 
     </releases> 
    </repository> 

이전에 필요에서 출발이었다 : 나는 수행하여 과거를 얻을 수 있었다

 <releases> 
      <enabled>false</enabled> 
     </releases> 

이 메이븐이 현재 유물에 대한 메타 데이터를 검색 할 때 일어날 것, 그리고 해당 검색 결과를 해당 유물을 포함 할 수있는 리포지토리로만 제한합니다.