【问题标题】:Maven install command in Eclipse fails with error Access denied , Error code 403, ForbiddenEclipse 中的 Maven 安装命令失败,错误访问被拒绝,错误代码 403,禁止访问
【发布时间】:2018-10-14 16:05:21
【问题描述】:

当我安装 Eclipse maven 时,它会失败并显示以下错误消息:

拒绝访问http://repo.maven.apache.org/maven2/org/apache/maven/plugin-tools/maven-plugin-annotations/3.1/maven-plugin-annotations-3.1.pom。错误代码 403,禁止

以下是完整的错误信息:

未能在项目 IoTIPDev 上执行目标 org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test):执行目标 org.apache.maven.plugins:maven 的默认测试-surefire-plugin:2.12.4:test failed: 插件 org.apache.maven.plugins:maven-surefire-plugin:2.12.4 或其依赖项之一无法解析:无法在 org.apache.maven 收集依赖项.plugins:maven-surefire-plugin:jar:2.12.4 -> org.apache.maven.surefire:maven-surefire-common:jar:2.12.4 -> org.apache.maven.plugin-tools:maven-plugin -annotations:jar:3.1:无法读取 org.apache.maven.plugin-tools 的工件描述符:maven-plugin-annotations:jar:3.1:无法传输工件 org.apache.maven.plugin-tools:maven-plugin -annotations:pom:3.1 from/to central (http://repo.maven.apache.org/maven2): 拒绝访问http://repo.maven.apache.org/maven2/org/apache/maven/plugin-tools/maven-plugin-annotations/3.1/maven-plugin-annotations-3.1.pom。错误代码 403,禁止 -> [帮助 1] [错误]

可能是什么问题?

【问题讨论】:

  • 我尝试从命令行执行 mvn install 并成功运行。该问题仅在 Eclipse 中发生。

标签: eclipse maven


【解决方案1】:

由于某种原因,eclipse 的 maven 不允许访问maven-plugin-annotations-3.1.pom。

确认 Eclipse 使用的 maven 版本与命令行使用的版本相同。

如果在 windows 中运行,则以管理员身份运行 Eclipse。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-08-31
    • 1970-01-01
    • 1970-01-01
    • 2021-12-13
    • 1970-01-01
    • 2019-11-06
    • 1970-01-01
    相关资源
    最近更新 更多