Наш внутренний репозиторий (Artifactory) теперь содержит как стабильные сборки, так и версии наших внутренних библиотек SNAPSHOT.
Для стабильных сборок никогда не возникало проблем с загрузкой чего-либо из хранилища.
Однако, когда я добавляю -SNAPSHOT, Maven утверждает, что не может найти зависимость, даже если она наиболее определенно находится в хранилище.
Если я строю и разворачиваю зависимость локально (т.е. в моем локальном репо), все работает нормально.
В основном это работает:
<dependency>
<groupId>com.example</groupId>
<artifactId>ourlibrary</artifactId>
<version>1.0.0</version>
</dependency>
а это не так:
<dependency>
<groupId>com.example</groupId>
<artifactId>ourlibrary</artifactId>
<version>1.0.1-SNAPSHOT</version>
</dependency>
Несмотря на то, что обе версии были построены одинаково и правильно (насколько я могу судить) развернуты в хранилище.
Ошибка:
Missing:
----------
1) com.example:ourlibrary:jar:1.0.1-SNAPSHOT,
Try downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=com.example -DartifactId=ourlibrary -Dversion=1.0.1-SNAPSHOT, -Dpackaging=jar -Dfile=/path/to/file
Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=com.example -DartifactId=ourlibrary -Dversion=1.0.1-SNAPSHOT, -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
Path to dependency:
1) com.example:product:war:2.0.0-SNAPSHOT
2) com.example:ourlibrary:jar:1.0.1-SNAPSHOT,
Хотя это звучит похоже на этот вопрос, полученное там разрешение не относится к моему делу.
Любая идея по этому вопросу будет принята с благодарностью.
Редактировать
Запуск с -X (как предположил Джон В.) показал следующее:
[DEBUG] Skipping disabled repository central
[DEBUG] ourlibrary: using locally installed snapshot
[DEBUG] Skipping disabled repository central
[DEBUG] Using mirror: http://repo.example.com/repo (id: repo.example.com)
[DEBUG] Artifact not found - using stub model: Unable to download the artifact from any repository
com.example:ourlibrary:pom:1.0.1-SNAPSHOT
from the specified remote repositories:
repo.example.com (http://repo.example.com/repo)
[DEBUG] Using defaults for missing POM com.example:ourlibrary:pom:1.0.1-SNAPSHOT:compile
[DEBUG] com.example:ourlibrary:jar:1.0.1-SNAPSHOT:compile (selected for compile)