myeclipse新建maven项目报错 大牛指点一下啊

SAOE2 2018-08-20 05:40:37
在新建的时候

console里报:18-8-20 下午05时36分57秒: Build errors for demo2; org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.0.2:resources (default-resources) on project demo2: Execution default-resources of goal org.apache.maven.plugins:maven-resources-plugin:3.0.2:resources failed: Unable to load the mojo 'resources' (or one of its required components) from the plugin 'org.apache.maven.plugins:maven-resources-plugin:3.0.2'



run as maven install 报
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building demo2 Maven Webapp 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-surefire-plugin/2.20.1/maven-surefire-plugin-2.20.1.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 21.456 s
[INFO] Finished at: 2018-08-20T17:39:12+08:00
[INFO] Final Memory: 3M/6M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-surefire-plugin:2.20.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-surefire-plugin:jar:2.20.1: Could not transfer artifact org.apache.maven.plugins:maven-surefire-plugin:pom:2.20.1 from/to central (https://repo.maven.apache.org/maven2): Connect to repo.maven.apache.org:443 [repo.maven.apache.org/151.101.24.215] failed: Connection timed out: connect -> [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
...全文
384 13 打赏 收藏 转发到动态 举报
写回复
用AI写文章
13 条回复
切换为时间正序
请发表友善的回复…
发表回复
SAOE2 2018-08-23
  • 打赏
  • 举报
回复
引用 11 楼 Ragin 的回复:
[quote=引用 10 楼 SAOE2 的回复:]老哥 我换了好多镜像
都报Unable to update index for net-cn|http://maven.net.cn/content/groups/public/ 这个

解决eclipse安装maven的问题:Unable to update index for central|http://repo1.maven.org/maven2[/quote]

老哥 我成功了 是myeclipse的问题 可能是之前8.6的版本太低了 换了10就好了
Braska 2018-08-22
  • 打赏
  • 举报
回复
引用 10 楼 SAOE2 的回复:
老哥 我换了好多镜像
都报Unable to update index for net-cn|http://maven.net.cn/content/groups/public/ 这个

解决eclipse安装maven的问题:Unable to update index for central|http://repo1.maven.org/maven2
SAOE2 2018-08-22
  • 打赏
  • 举报
回复



引用 8 楼 Ragin 的回复:
Could not transfer artifact org.apache.maven.plugins:maven-surefire-plugin:pom:2.20.1 from/to central (https://repo.maven.apache.org/maven2): Connect to repo.maven.apache.org:443 [repo.maven.apache.org/151.101.24.215] failed: Connection timed out: connect -> [Help 1]
配置没错啊。。。 错误的地址是这个,你有没有加载错setting文件?



老哥 我换了好多镜像
都报Unable to update index for net-cn|http://maven.net.cn/content/groups/public/ 这个
SAOE2 2018-08-22
  • 打赏
  • 举报
回复
引用 8 楼 Ragin 的回复:
Could not transfer artifact org.apache.maven.plugins:maven-surefire-plugin:pom:2.20.1 from/to central (https://repo.maven.apache.org/maven2): Connect to repo.maven.apache.org:443 [repo.maven.apache.org/151.101.24.215] failed: Connection timed out: connect -> [Help 1]
配置没错啊。。。 错误的地址是这个,你有没有加载错setting文件?


绝对没有
Braska 2018-08-21
  • 打赏
  • 举报
回复

Could not transfer artifact org.apache.maven.plugins:maven-surefire-plugin:pom:2.20.1 from/to central (https://repo.maven.apache.org/maven2): Connect to repo.maven.apache.org:443 [repo.maven.apache.org/151.101.24.215] failed: Connection timed out: connect -> [Help 1]
配置没错啊。。。 错误的地址是这个,你有没有加载错setting文件?
SAOE2 2018-08-21
  • 打赏
  • 举报
回复
发错了
SAOE2 2018-08-21
  • 打赏
  • 举报
回复
引用 5 楼 Ragin 的回复:
[quote=引用 4 楼 SAOE2 的回复:]
[quote=引用 3 楼 Ragin 的回复:]
[quote=引用 2 楼 SAOE2 的回复:]
老哥 是在mirror里修改吗 没有用啊


改完以后我记得myeclipse要reindex的。[/quote]


老哥 还是不行 我按照网上的教程看了一下jar包里的中央仓库地址就是http://repo1.maven.org/maven2
后来换了阿里的还是不行啊[/quote]

按理不应该啊,你把setting.xml贴出来看下。[/quote]





老哥 就是这样。
Braska 2018-08-21
  • 打赏
  • 举报
回复
引用 4 楼 SAOE2 的回复:
[quote=引用 3 楼 Ragin 的回复:]
[quote=引用 2 楼 SAOE2 的回复:]
老哥 是在mirror里修改吗 没有用啊


改完以后我记得myeclipse要reindex的。[/quote]


老哥 还是不行 我按照网上的教程看了一下jar包里的中央仓库地址就是http://repo1.maven.org/maven2
后来换了阿里的还是不行啊[/quote]

按理不应该啊,你把setting.xml贴出来看下。
SAOE2 2018-08-20
  • 打赏
  • 举报
回复
引用 3 楼 Ragin 的回复:
[quote=引用 2 楼 SAOE2 的回复:]
老哥 是在mirror里修改吗 没有用啊


改完以后我记得myeclipse要reindex的。[/quote]


老哥 还是不行 我按照网上的教程看了一下jar包里的中央仓库地址就是http://repo1.maven.org/maven2
后来换了阿里的还是不行啊
Braska 2018-08-20
  • 打赏
  • 举报
回复
引用 2 楼 SAOE2 的回复:
老哥 是在mirror里修改吗 没有用啊


改完以后我记得myeclipse要reindex的。
SAOE2 2018-08-20
  • 打赏
  • 举报
回复
引用 1 楼 Ragin 的回复:
failed: Connection timed out: connect
连接超时。中央仓库地址换成http://repo1.maven.org/maven2或者国内的仓库地址试试


老哥 是在mirror里修改吗 没有用啊
Braska 2018-08-20
  • 打赏
  • 举报
回复
failed: Connection timed out: connect
连接超时。中央仓库地址换成http://repo1.maven.org/maven2或者国内的仓库地址试试

67,513

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧