Khi tôi cố gắng sử dụng versions:use-releases
kho lưu trữ bản phát hành của tôi được đánh dấu là "bị vô hiệu hóa", nghĩa là phụ thuộc ảnh chụp không được giải quyết cho bản phát hành. Tôi không hiểu tại sao kho lưu trữ bị coi là bị vô hiệu hóa.Maven Phiên bản Bỏ qua Bỏ qua Cập nhật Kiểm tra
Đây là viết tắt kết xuất debug từ xây dựng:
[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/)
tôi chạy một thiết lập phản ánh yêu cầu central
để dụ Nexus của chúng tôi, và cũng có thể xác định một kho lưu trữ ảnh chụp toàn cầu quá:
<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>
Có một phiên bản phát hành và chụp nhanh của phụ thuộc được đề cập và kho lưu trữ hoạt động chính xác như mong đợi ở tất cả các khía cạnh khác.
@ZnArK - Làm thế nào để cú pháp XML làm nổi bật? –
cho xml bạn cần phải thêm chú thích ' SO sử dụng prettify, đây là README http://google-code-prettify.googlecode.com/svn/trunk/README. html Đây cũng là một tài nguyên tuyệt vời http://meta.stackexchange.com/a/75019/187632 – ZnArK
1 lên vì tôi đã có cùng một vấn đề chính xác và câu trả lời này làm việc hoàn hảo –