【问题标题】:Failed to create maven project in Eclipse Java EE IDE无法在 Eclipse Java EE IDE 中创建 maven 项目
【发布时间】:2015-12-11 06:32:13
【问题描述】:

默认情况下,maven 插件与最新的 Eclipse IDE 版本(例如 Mars)集成。但是,在创建 Maven 项目时,它只会抛出以下错误:

注意:它不进行任何代理设置

无法计算构建计划:插件 org.apache.maven.plugins:maven-resources-plugin:2.6 或其之一 无法解决依赖关系:找不到 org.apache.maven.plugins:maven-resources-plugin:jar:2.6 in http://localhost:8081/nexus/content/groups/public 被缓存在 本地存储库,直到更新才会重新尝试解析 nexus 间隔已过或强制更新插件 org.apache.maven.plugins:maven-resources-plugin:2.6 或其之一 无法解决依赖关系:找不到 org.apache.maven.plugins:maven-resources-plugin:jar:2.6 in http://localhost:8081/nexus/content/groups/public 被缓存在 本地存储库,直到更新才会重新尝试解析 nexus 间隔已过或强制更新

使用的工具:

Eclipse Java EE IDE for Web Developers.
Version: Mars Release (4.5.0)

【问题讨论】:

  • 是的,我理解,但这不是代理问题。刚才注意到了问题,在xml文件中添加了镜像;我想我已经对这个问题给出了明确的答案;希望它能帮助很多用户:)

标签: eclipse maven eclipse-plugin


【解决方案1】:

以下 xml 文件对我有用。,这样做..

1|在以下位置创建一个 xml 文件 (settings.xml), C:\Users\username\.m2\settings.xml

2|复制并粘贴下面包含多个镜像标签的xml sn-p。

3|保存 xml 文件。

<settings xmlns="http://maven.apache.org/POM/4.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
                      http://maven.apache.org/xsd/settings-1.0.0.xsd">
    <mirrors>
        <mirror>
            <id>ibiblio.org</id>
            <url>http://mirrors.ibiblio.org/pub/mirrors/maven2</url>
            <mirrorOf>central</mirrorOf>
            <!-- United States, North Carolina -->
        </mirror>
        <mirror>
            <id>lsu.edu</id>
            <url>http://ibiblio.lsu.edu/main/pub/packages/maven2</url>
            <mirrorOf>central</mirrorOf>
            <!-- United States, Louisiana -->
        </mirror>
        <mirror>
            <id>sateh.com</id>
            <url>http://maven.sateh.com/repository</url>
            <mirrorOf>central</mirrorOf>
            <!-- The Netherlands, Amsterdam -->
        </mirror>
        <mirror>
            <id>dotsrc.org</id>
            <url>http://mirrors.dotsrc.org/maven2</url>
            <mirrorOf>central</mirrorOf>
            <!-- Denmark -->
        </mirror>
        <mirror>
            <id>sunsite.dk</id>
            <url>http://mirrors.sunsite.dk/maven2</url>
            <mirrorOf>central</mirrorOf>
            <!-- Denmark -->
        </mirror>
        <mirror>
            <id>skynet.be</id>
            <url>http://maven2.mirrors.skynet.be/pub/maven2</url>
            <mirrorOf>central</mirrorOf>
            <!-- Belgium -->
        </mirror>
        <mirror>
            <id>cica.es</id>
            <url>http://ftp.cica.es/mirrors/maven2</url>
            <mirrorOf>central</mirrorOf>
            <!-- Spain, Sevilla -->
        </mirror>
        <mirror>
            <id>redv.com</id>
            <url>http://mirrors.redv.com/maven2</url>
            <mirrorOf>central</mirrorOf>
            <!-- Shanghai, China -->
        </mirror>

        <!-- these just point to ibiblio.org -->
        <mirror>
            <id>ibiblio.net</id>
            <url>http://www.ibiblio.net/pub/packages/maven2</url>
            <mirrorOf>central</mirrorOf>
            <!-- United States, North Carolina -->
        </mirror>
        <mirror>
            <id>ggi-project.org</id>
            <url>http://ftp.ggi-project.org/pub/packages/maven2</url>
            <mirrorOf>central</mirrorOf>
            <!-- The Netherlands, Amsterdam -->
        </mirror>
    </mirrors>
    <profiles>
        <profile>
            <id>alwaysActiveProfile</id>
            <repositories>
                <repository>
                    <id>central</id>
                    <url>http://repo1.maven.org/maven2/</url>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                </repository>
            </repositories>
        </profile>
    </profiles>
    <activeProfiles>
        <activeProfile>alwaysActiveProfile</activeProfile>
    </activeProfiles>
</settings>

4|转到,Eclipse > 窗口 > 首选项 > Maven > 用户设置

5|检查用户设置位置

【讨论】:

    【解决方案2】:

    这也让我感到不安,但有人给了我这个解决方案,它奏效了

    确保您在线

    • 右键单击您的项目 -点击Maven

    -更新项目

    -强制更新快照/发布

    -好的

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-09-19
      • 2015-07-08
      • 1970-01-01
      • 1970-01-01
      • 2022-01-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多