Maven无法读取org.codehaus.mojo的工件描述符:jaxb2-maven-plugin:jar:1.6在pom.xml中?

时间:2015-01-12 08:46:56

标签: maven

我已经从Eclipse(luna)中的svn签出了“Checkout Maven Project as SCM”。之后我在pom.xml中收到g错误。如何解决错误.Below是错误...

CONSOLE.LOG:

> [INFO] Scanning for projects... [INFO]  [INFO] Using the builder
> org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder
> with a thread count of 1 [INFO]                                       
> [INFO]
> ------------------------------------------------------------------------ [INFO] Building Bosch FS module 1.1-snapshot [INFO]
> ------------------------------------------------------------------------ [INFO] Downloading:
> http://repo.maven.apache.org/maven2/org/codehaus/mojo/jaxb2-maven-plugin/1.6/jaxb2-maven-plugin-1.6.pom
> [INFO]
> ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO]
> ------------------------------------------------------------------------ [INFO] Total time: 0.717 s [INFO] Finished at:
> 2015-01-12T09:33:05+01:00 [INFO] Final Memory: 6M/76M [INFO]
> ------------------------------------------------------------------------ [ERROR] Plugin org.codehaus.mojo:jaxb2-maven-plugin:1.6 or one of its
> dependencies could not be resolved: Failed to read artifact descriptor
> for org.codehaus.mojo:jaxb2-maven-plugin:jar:1.6: Could not transfer
> artifact org.codehaus.mojo:jaxb2-maven-plugin:pom:1.6 from/to central
> (http://repo.maven.apache.org/maven2): repo.maven.apache.org: Unknown
> host repo.maven.apache.org -> [Help 1] [ERROR]  [ERROR] To see the
> full stack trace of the errors, re-run Maven with the -e switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]  [ERROR] For more information about the errors and possible
> solutions, please read the following articles: [ERROR] [Help 1]
> http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException

谢谢你, 希瓦

2 个答案:

答案 0 :(得分:1)

问题 我认为您无法从maven中央存储库下载所需的工件,因为您的代理服务器会阻止中央存储库。

可能的解决方案 脚步 1-goto C:\ Users \ username.m2并删除存储库文件夹。 2 - 在同一位置创建一个settings.xml

<settings>
<proxies>
 <proxy>
  <active>true</active>
  <protocol>http</protocol>
  <host>ip of your proxy</host>
  <port>port of your proxy</port>
  <username>your machine login username</username>
  <password>your machine login password</password>
  <nonProxyHosts>local.net|some.host.com</nonProxyHosts>
</proxy>
</proxies>
</settings>

答案 1 :(得分:0)

中央存储库的网址似乎是旧网址。推荐的网址是以下https://repo1.maven.org/maven2