【问题标题】:maven failure to resolve archetype ear-jee5maven 无法解决原型 ear-jee5
【发布时间】:2011-06-09 06:32:35
【问题描述】:

我正在尝试使用ear-jee5 作为原型创建一个EAR maven 模块项目(在eclipse 中)。它失败并出现以下错误。

Could not resolve archetype org.codehaus.mojo.archetypes:ear-jee5:1.3 from any of the configured repositories.
Could not resolve artifact
Missing org.codehaus.mojo.archetypes:ear-jee5:pom:1.3

有人可以帮我解决这个错误或告诉我另一种方法来为 Maven EAR 模块创建项目结构吗?

谢谢。

【问题讨论】:

  • 您是否能够创建 任何 maven 原型,或者那个特定的原型失败了?
  • 看来问题出在办公室的防火墙上。添加未被防火墙阻止的镜像解决了这个问题。

标签: maven ear java-ee-5 maven-archetype


【解决方案1】:

显然,失败似乎是因为我在办公室的代理/防火墙后面。解决方案是在您的 settings.xml 中添加代理配置或添加未被防火墙阻止的存储库镜像。

希望这对某人有所帮助。

添加代理

  <proxies>
    <!-- proxy
     | Specification for one proxy, to be used in connecting to the network.
     |
    <proxy>
      <id>optional</id>
      <active>true</active>
      <protocol>http</protocol>
      <username>proxyuser</username>
      <password>proxypass</password>
      <host>proxy.host.net</host>
      <port>80</port>
      <nonProxyHosts>local.net|some.host.com</nonProxyHosts>
    </proxy>
    -->
  </proxies>

或镜子

  <mirrors>
    <!-- mirror
     | Specifies a repository mirror site to use instead of a given repository. The repository that
     | this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used
     | for inheritance and direct lookup purposes, and must be unique across the set of mirrors.
     |
    <mirror>
      <id>mirrorId</id>
      <mirrorOf>repositoryId</mirrorOf>
      <name>Human Readable Name for this Mirror.</name>
      <url>http://my.repository.com/repo/path</url>
    </mirror>
  <mirrors>

谢谢

【讨论】:

  • 一开始我设置了代理。但它不起作用。然后我尝试设置镜像。然后只能下载原型。结论是我需要同时做代理和镜像。感谢您的提示。
猜你喜欢
  • 1970-01-01
  • 2023-03-23
  • 2018-09-26
  • 2021-05-06
  • 1970-01-01
  • 2017-01-06
  • 1970-01-01
  • 2011-12-09
  • 1970-01-01
相关资源
最近更新 更多