Maven не может получить сборки SNAPSHOT из репозитория

Наш внутренний репозиторий (Artifactory) теперь содержит как стабильные сборки, так и версии SNAPSHOT наших внутренних библиотек.

Для стабильных сборок никогда не было проблема с загрузкой чего-либо из репозитория.

Однако, когда я добавляю -SNAPSHOT, Maven заявляет, что не может найти зависимость, даже если она определенно находится в репозитории.

Если я построю и разверну зависимость локально (то есть в моем локальном репозитории), все будет работать нормально.

В принципе, это работает:


  com.example
  ourlibrary
  1.0.0

, а это нет:


  com.example
  ourlibrary
  1.0.1-SNAPSHOT

Хотя обе версии были созданы одинаково и правильно развернул (насколько я могу судить) в репозиторий.

Ошибка:

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,

Хотя это звучит похоже на этот вопрос, полученное решение не относится к моему case.

Мы будем очень благодарны за любое понимание этой проблемы.

Править

Запуск с -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)

27
задан Community 23 May 2017 в 12:25
поделиться