我有一个奇怪的问题。我有自己的远程存储库并上传他们的插件。然后我尝试在打包项目时下载它。 Maven开始从own_remote_repo下载,但下载1个文件开始在repo1.maven.org/maven2上搜索另一个文件,当然找不到插件并失败。Maven从不同存储库的插件下载文件
我以前多次使用此回购没有问题。
[编辑]
输出:
Downloading: http://repo1.maven.org/maven2/com/my/maven/plugin/maven-plugin/1.1.3/maven-plugin-1.1.3.pom
[INFO] Unable to find resource 'com.my.maven.plugin:maven-plugin:pom:1.1.3' in repository central (http://repo1.maven.org/maven2)
Downloading: http://<server>:<port>/nexus/content/groups/public/com/my/maven/plugin/maven-plugin/1.1.3/maven-plugin-1.1.3.pom
3K downloaded (maven-plugin-1.1.3.pom)
Downloading: http://repo1.maven.org/maven2/com/my/maven/plugin/maven-plugin/1.1.3/maven-plugin-1.1.3.jar
[INFO] Unable to find resource 'com.my.maven.plugin:maven-plugin:maven-plugin:1.1.3' in repository central (http://repo1.maven.org/maven2)
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] A required plugin was not found: Plugin could not be found - check that the goal name is correct: Unable to download the artifact from any repository
所以你可以在Maven的插件,1.1.3.pom行家的你下载过之后,会尝试从行家中心下载jar文件repo ....
插件jar文件位于nexus上的同一目录中,并且名称与maven试图找到的jar文件相同。 从nexus下载的maven-plugin-1.1.3.pom是正确的。
任何想法?
你可以从maven发布一个示例输出来显示它吗? –
完成。我希望这可以帮助你 – Oleksandr