maven build时报错Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test
[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 install时报错 Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test)
今天在一个maven项目上执行maven install命令的时候一直报错,错误信息如下: [INFO] ----------------------------------------------- ...
- maven install时报错Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile
首先检查父项目,子项目的jdk版本是否一致,编码格式是否一致我的问题就错在了编码格式上,父项目用的是UTF-8,子项目新建的,默认GBK这时,使用maven install命令出错 提示:[INFO] ...
- maven install时报错Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test
事故现场: 解决办法: 一是命令行, mvn clean package -Dmaven.test.skip=true 二是写入pom文件, <plugin> <groupId> ...
- 启动Maven项目时报错Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean (default-clean) on project **-web: Failed to clean project: Failed to delete E:\**\target\tomcat\logs\access_lo
这类错误 出现这种错误,通常是由于您已启动了另一个tomcat 进程或者运行的javaw.exe进程,导致报错. 解决方法: 1. 鼠标点击 X 进行关闭运行失败的 Console页,(如果运行多次, ...
- 在IDEA上 使用maven进行打包时报错: Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.10.2:jar
报错内容: Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.10.2:jar (attach-javado ...
- git 打包报错:Maven Build时提示:Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test
1.使用git 升级 服务命令 mvn deploy -e 之后报错: Failed to execute goal org.apache.maven.plugins:maven-surefire- ...
- maven install 报错Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project*****
[ERROR]Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-co ...
- SpringBoot MAVEN编译报错Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:
参考了好几篇文章没搞定,直到查询错误关键字 An unknown compilation problem occurred 分别参考了以下博客: https://blog.csdn.net/fanre ...
- maven install 报错 Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test
pom文件引入以下依赖 <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId> ...
随机推荐
- CSS3 Background-clip
上一节在<CSS3 background-size>详细的介绍了CSS3为background新增属性之一,今天和大家一起来学习CSS3中有关于Background的第二新属性Backgr ...
- golang interface类型转string等其他类型
inter 是interface类型,转化为string类型是: str := inter .(string) 转为其他类型也类似
- eval()和$.parseJSON()注意事项
在前后端分离大行其道XXX(巴拉巴拉的废话不多讲了).描述实际应用场景:后台组装数据,返回到前台调用. 刚开始没有注意“后台返回字符串_1”的形式,使用eval()处理. 只是返回了字符串,不是严格意 ...
- TypeError: can only concatenate str (not "int") to str解决方式
使用format函数解决问题 for page in range(1,pagebox+1): url = "https://www.dd373.com/s/rbg22w-x9kjbs-wwf ...
- 简单使用zabbix监控nginx是否存活
1.在agent端修改主配置文件 vim /etc/zabbix/zabbix_agentd.conf ........ ........ UserParameter=nginx.status[*], ...
- Security配置文件的基本配置及参数名详解
<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.spr ...
- C++智能指针剖析(上)std::auto_ptr与boost::scoped_ptr
1. 引入 C++语言中的动态内存分配没有自动回收机制,动态开辟的空间需要用户自己来维护,在出函数作用域或者程序正常退出前必须释放掉. 即程序员每次 new 出来的内存都要手动 delete,否则会造 ...
- vs2013下配置opencv1.0.0
vs2013下配置opencv1.0.0 2019-4-25 17:13:13 原因 现在最新opencv已经到4.0.1版了.用opencv1.0原因: 小.源码包只有10M左右. 清晰.他的文档结 ...
- 在GNU/Linux下制作Windows 10安装U盘
今年春节回家期间,我需要将家里的一台安装了Debian Stretch的ZaReason笔记本电脑更换为Windows 10系统,好让爸妈从老台式机上的XP系统升级到新的平台上来.回家前,小仙女已在微 ...
- [原创]免固件开发USB2.0 FPGA方案 速度40Mbyte/s+
USB 2.0接口,实测速度40Mbyte/s: 一个接口实现两种功能(USB2.0+FPGA配置): 免固件开发: 完整的FPGA代码,即拿即用: FPGA逻辑工程师开发USB接口福音: 平台可移植 ...