在插件库中找不到插件 - 当我的公司Nexus停机时如何解决问题? [英] Plugin not found in plugin repository - How fix an issue when my company Nexus is down?
问题描述
我试图在本地执行 Hadoop
,当我执行时
$ mvn -U clean install -Pdist -Dtar -Ptest-patch
如上所述 - http://wiki.apache.org/hadoop/HowToSetupYourDevelopmentEnvironment
[错误]从版本库解析插件'org.apache.maven.plugins:maven-javadoc-plugin'时出错[local(/Users/me/.m2/存储库),nexus(http://beefy.myorg.local:8081 / nexus / content / groups / public)]:在任何插件库中找不到插件 - > [Help 1]
当我在控制台上看到日志时,我看到
[INFO] Apache Hadoop分发
[INFO] Apache Hadoop客户端
[INFO] Apache Hadoop迷你集群
[INFO] ]
[信息] ------------------------------------------ ------------------------------
[INFO]构建Apache Hadoop主3.0.0-SNAPSHOT
[INFO] ----------------------------------------------- -------------------------
下载:http://beefy.myorg.local:8081 / nexus / content / groups / public /org/apache/maven/plugins/maven-javadoc-plugin/maven-metadata.xml
[警告]无法传输元数据org.apache.maven.plugins:maven-javadoc-plugin / maven-metadata.xml从/到nexus(http://beefy.myorg.local:8081 / nexus / content / groups / public):错误传输文件:操作超时
由于我公司的 nexus
有问题,有什么方法可以解决这让hadoop构建?
$ b 更新
在添加<$ c
$ b
[错误]无法执行目标项目hadoop:无法解决项目groupId的依赖关系:hadoop:jar:master-SNAPSHOT:无法收集[org.apache.hadoop:hadoop-core:jar:0.20.2(compile)]的依赖关系:无法读取artifact描述符org.apache.hadoop:hadoop-core:jar:0.20.2:无法传输工件org.apache.hadoop:hadoop-core:pom:0.20.2 from / to nexus(http://beefy.myorg。 local:8081 / nexus / content / groups / public):传输文件时出错:操作超时 - > [Help 1]
,这是 pom.xml
< repositories>
< repository>
< id> mvnrepository< / id>
< url> http://mvnrepository.com/artifact/< / url>
< / repository>
< / repositories>
<依赖关系>
< dependency>
< groupId> org.apache.hadoop< / groupId>
< artifactId> hadoop-core< / artifactId>
< version> 0.20.2< / version>
< /依赖关系>
< /依赖关系>
如果您可以访问互联网,只需声明一个新的Maven仓库(在你的POM中,或在你的settings.xml中):
< repositories>
< repository>
< id> your-internal-repo< / id>
< url> http://beefy.myorg.local:8081 / nexus / content /< / url>
< / repository>
< repository>
< id> mvnrepository< / id>
< url> http://mvnrepository.com/artifact/< / url>
< / repository>
< / repositories>
此配置将首先尝试从您的存储库下载,然后失败。 )
确实,您的内部存储库是一个代理,可以缓存远程存储库(mvnrepository )。
I am trying to buld Hadoop
locally and when I do
$ mvn -U clean install -Pdist -Dtar -Ptest-patch
as mentioned - http://wiki.apache.org/hadoop/HowToSetupYourDevelopmentEnvironment
[ERROR] Error resolving version for plugin 'org.apache.maven.plugins:maven-javadoc-plugin' from the repositories [local (/Users/me/.m2/repository), nexus (http://beefy.myorg.local:8081/nexus/content/groups/public)]: Plugin not found in any plugin repository -> [Help 1]
As I see logs on console, I see
[INFO] Apache Hadoop Distribution
[INFO] Apache Hadoop Client
[INFO] Apache Hadoop Mini-Cluster
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Apache Hadoop Main 3.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: http://beefy.myorg.local:8081/nexus/content/groups/public/org/apache/maven/plugins/maven-javadoc-plugin/maven-metadata.xml
[WARNING] Could not transfer metadata org.apache.maven.plugins:maven-javadoc-plugin/maven-metadata.xml from/to nexus (http://beefy.myorg.local:8081/nexus/content/groups/public): Error transferring file: Operation timed out
Since nexus
in my company is down, is there any way I can resolve this and let hadoop build?
UPDATE
After adding the repository
in my project pom, it still fails
[ERROR] Failed to execute goal on project hadoop: Could not resolve dependencies for project groupId:hadoop:jar:master-SNAPSHOT: Failed to collect dependencies for [org.apache.hadoop:hadoop-core:jar:0.20.2 (compile)]: Failed to read artifact descriptor for org.apache.hadoop:hadoop-core:jar:0.20.2: Could not transfer artifact org.apache.hadoop:hadoop-core:pom:0.20.2 from/to nexus (http://beefy.myorg.local:8081/nexus/content/groups/public): Error transferring file: Operation timed out -> [Help 1]
and this is pom.xml
<repositories>
<repository>
<id>mvnrepository</id>
<url>http://mvnrepository.com/artifact/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-core</artifactId>
<version>0.20.2</version>
</dependency>
</dependencies>
If you have access to internet, simply declare a new maven repository (in you pom, or in you settings.xml) :
<repositories>
<repository>
<id>your-internal-repo</id>
<url>http://beefy.myorg.local:8081/nexus/content/</url>
</repository>
<repository>
<id>mvnrepository</id>
<url>http://mvnrepository.com/artifact/</url>
</repository>
</repositories>
This configuration will first try to download from you repository, then fail. And maven will try all declared repositories, until it works .... or not :)
Indeed, your internal repository is a proxy, that caches the distant one (mvnrepository).
这篇关于在插件库中找不到插件 - 当我的公司Nexus停机时如何解决问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!