maven build时报错Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test

时间:2022-08-31 21:30:20
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.319 s
[INFO] Finished at: --24T10::+:
[INFO] Final Memory: 16M/205M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.:test (default-test) on project base-util: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.12.:test failed: Plugin org.apache.maven.plugins:maven-surefire-plugin:2.12. or one of its dependencies could not be resolved: Failure to find org.apache.maven.surefire:maven-surefire-common:jar:2.12. in http://192.168.16.91/nexus/content/groups/public/ was cached in the local repository, resolution will not be reattempted until the update interval of user-releases has elapsed or updates are forced -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.:test (default-test) on project zhiyuan-base-util: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.12.:test failed: Plugin org.apache.maven.plugins:maven-surefire-plugin:2.12. or one of its dependencies could not be resolved: Failure to find org.apache.maven.surefire:maven-surefire-common:jar:2.12. in http://192.168.16.91/nexus/content/groups/public/ was cached in the local repository, resolution will not be reattempted until the update interval of user-releases has elapsed or updates are forced
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:)
at java.lang.reflect.Method.invoke(Method.java:)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.12.:test failed: Plugin org.apache.maven.plugins:maven-surefire-plugin:2.12. or one of its dependencies could not be resolved: Failure to find org.apache.maven.surefire:maven-surefire-common:jar:2.12. in http://192.168.16.91/nexus/content/groups/public/ was cached in the local repository, resolution will not be reattempted until the update interval of user-releases has elapsed or updates are forced
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:)
... more
Caused by: org.apache.maven.plugin.PluginResolutionException: Plugin org.apache.maven.plugins:maven-surefire-plugin:2.12. or one of its dependencies could not be resolved: Failure to find org.apache.maven.surefire:maven-surefire-common:jar:2.12. in http://192.168.16.91/nexus/content/groups/public/ was cached in the local repository, resolution will not be reattempted until the update interval of user-releases has elapsed or updates are forced
at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve(DefaultPluginDependenciesResolver.java:)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.createPluginRealm(DefaultMavenPluginManager.java:)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.setupPluginRealm(DefaultMavenPluginManager.java:)
at org.apache.maven.plugin.DefaultBuildPluginManager.getPluginRealm(DefaultBuildPluginManager.java:)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:)
... more
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Failure to find org.apache.maven.surefire:maven-surefire-common:jar:2.12. in http://192.168.16.91:8080/nexus/content/groups/public/ was cached in the local repository, resolution will not be reattempted until the update interval of user-releases has elapsed or updates are forced
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:)
at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve(DefaultPluginDependenciesResolver.java:)
... more
Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Failure to find org.apache.maven.surefire:maven-surefire-common:jar:2.12. in http://192.168.16.91/nexus/content/groups/public/ was cached in the local repository, resolution will not be reattempted until the update interval of user-releases has elapsed or updates are forced
at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:)
at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:)
... more
[ERROR]
[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 ] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException

可能原因有很多个, 
1. maven私服连不上了, 有一些jar包没有下载到本地, 或者是私服的路径配置错误

    <distributionManagement>
<repository>
<id>user-releases</id>
<name>Nexus Release Repository</name>
<url>http://192.168.16.91/nexus/content/repositories/releases/</url>
</repository>
<snapshotRepository>
<id>user-snapshots</id>
<name>Nexus Snapshot Repository</name>
<url>http://192.168.16.91/nexus/content/repositories/snapshots/</url>
</snapshotRepository>
</distributionManagement>

配置可以参考上面这段, url链接要在地址栏里面能打开才算正确

还有可能是一个jar包下载失败, jar包坏了, 可以删掉本地的repository, 执行maven->update project...重新下载jar到本地仓库

2. .classpath配置文件错误

  在项目上右键->properties->java build path->source->删掉里面的src/main/java和src/test/java配置, 然后点右侧的add folder重新添加

3. 测试类里面报错, 导致无法build

  可以删掉测试类, 重新尝试构建

4. 如果以上三个都无法解决这个问题, 那就删工作空间吧, 干掉workspace!!

如需帮助可向我发起QQ聊天发起QQ聊天

友情赞助

如果您喜欢此文,感觉对您工作有帮助,预期领导会给您涨工资,不妨小额赞助一下,让我有动力继续努力。

赞助方式:打开支付宝App,使用“扫一扫”付款,付款码见下图,别忘了付款留言哦!

maven build时报错Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test
或使用微信, 不用加好友就能付款
maven build时报错Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test

maven build时报错Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test的更多相关文章

  1. maven install时报错 Failed to execute goal org&period;apache&period;maven&period;plugins&colon;maven-surefire-plugin&colon;2&period;12&period;4&colon;test &lpar;default-test&rpar;

    今天在一个maven项目上执行maven install命令的时候一直报错,错误信息如下: [INFO] ----------------------------------------------- ...

  2. maven install时报错Failed to execute goal org&period;apache&period;maven&period;plugins&colon;maven-compiler-plugin&colon;2&period;3&period;2&colon;compile

    首先检查父项目,子项目的jdk版本是否一致,编码格式是否一致我的问题就错在了编码格式上,父项目用的是UTF-8,子项目新建的,默认GBK这时,使用maven install命令出错 提示:[INFO] ...

  3. maven install时报错Failed to execute goal org&period;apache&period;maven&period;plugins&colon;maven-surefire-plugin&colon;2&period;12&period;4&colon;test

    事故现场: 解决办法: 一是命令行, mvn clean package -Dmaven.test.skip=true 二是写入pom文件, <plugin> <groupId&gt ...

  4. 启动Maven项目时报错Failed to execute goal org&period;apache&period;maven&period;plugins&colon;maven-clean-plugin&colon;2&period;5&colon;clean &lpar;default-clean&rpar; on project &ast;&ast;-web&colon; Failed to clean project&colon; Failed to delete E&colon;&bsol;&ast;&ast;&bsol;target&bsol;tomcat&bsol;logs&bsol;access&lowbar;lo

    这类错误 出现这种错误,通常是由于您已启动了另一个tomcat 进程或者运行的javaw.exe进程,导致报错. 解决方法: 1. 鼠标点击 X 进行关闭运行失败的 Console页,(如果运行多次, ...

  5. 在IDEA上 使用maven进行打包时报错&colon; Failed to execute goal org&period;apache&period;maven&period;plugins&colon;maven-javadoc-plugin&colon;2&period;10&period;2&colon;jar

    报错内容: Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.10.2:jar (attach-javado ...

  6. git 打包报错&colon;Maven Build时提示&colon;Failed to execute goal org&period;apache&period;maven&period;plugins&colon;maven-surefire-plugin&colon;2&period;12&period;4&colon;test

    1.使用git 升级 服务命令 mvn  deploy -e 之后报错: Failed to execute goal org.apache.maven.plugins:maven-surefire- ...

  7. maven install 报错Failed to execute goal org&period;apache&period;maven&period;plugins&colon;maven-compiler-plugin&colon;3&period;1&colon;compile &lpar;default-compile&rpar; on project&ast;&ast;&ast;&ast;&ast;

    [ERROR]Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-co ...

  8. SpringBoot MAVEN编译报错Failed to execute goal org&period;apache&period;maven&period;plugins&colon;maven-compiler-plugin&colon;3&period;8&period;0&colon;

    参考了好几篇文章没搞定,直到查询错误关键字 An unknown compilation problem occurred 分别参考了以下博客: https://blog.csdn.net/fanre ...

  9. maven install 报错 Failed to execute goal org&period;apache&period;maven&period;plugins&colon;maven-surefire-plugin&colon;2&period;12&period;4&colon;test

    pom文件引入以下依赖 <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId&gt ...

随机推荐

  1. Java 之 数据库

    1.SQL--结构化查询语言 a.分类:①DDL--数据定义语言 ②DQL--数据查询语言 ③DML--数据操作语言 ④DCL--数据控制语言 b.DDL:包括对数据库的创建.使用.删除,对表的创建. ...

  2. Django 1&period;10 找不到静态资源解决方法

    测试版本:Django 1.10 问题:Django项目找不到静态资源 解决方法: 1.首先你需要在自己的app下面创建2个目录 static 和  templates 树形结构如下(DjangoPr ...

  3. iOS9中的App Transport Security

    问题:webView加载网页加载不出来 原因:苹果在iOS9 sdk中加入了App Transport Security限制(iOS9以前的iOS sdk默认关闭ATS),默认强制使用https,并且 ...

  4. (转)关于Certificate、Provisioning Profile、App ID的介绍及其之间的关系

    转自http://www.cnblogs.com/cywin888/p/3263027.html 刚接触iOS开发的人难免会对苹果的各种证书.配置文件等不甚了解,可能你按照网上的教程一步一步的成功申请 ...

  5. MVC3中的路由系统(Routes)

    转载:http://blog.csdn.net/francislaw/article/details/7429317 MVC中,用户访问的地址并不映射到服务器中对应的文件,而是映射到对应Control ...

  6. Generative Adversarial Nets&lbrack;Wasserstein GAN&rsqb;

    本文来自<Wasserstein GAN>,时间线为2017年1月,本文可以算得上是GAN发展的一个里程碑文献了,其解决了以往GAN训练困难,结果不稳定等问题. 1 引言 本文主要思考的是 ...

  7. STM32 一直进入串口接收中断

    解决方法一: .串口初始化配置时,需要打开ORE 溢出中断,否则串口中断没有及时读取数据会触发溢出中断(打开接收中断默认开启溢出中断,但是为了读取溢出标志位还需要明确执行以下打开溢出中断),如果没有清 ...

  8. word2vector 资料

    http://blog.csdn.net/garfielder007/article/details/51345201 https://cs224d.stanford.edu/lecture_note ...

  9. 对于装office 365时,visio不兼容的解决

    先将office 365装好,之后从这个网址下载visio安装即可,但是没有 激活码,需要自己激活: 网址:链接: https://pan.baidu.com/s/1OqONPuJ0eumrpts-X ...

  10. redis该怎么用

    最近一些人在介绍方案时,经常会出现redis这个词,于是很多小伙伴百度完redis也就觉得它是一个缓存,然后项目里面把数据丢进去完事,甚至有例如将实体属性拆分塞进redis hash里面的奇怪用法等等 ...