Failed to execute goal org.apache.maven.plugins:maven-resources-plugin

1.Failed to execute goal org.apache.maven.plugins:maven-resources-plugin
原因是 maven启动器版本高了

2.Internal Error occurred.
org.junit.platform.commons.JUnitException: TestEngine with ID ‘junit-jupiter’ failed to discover tests
at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discoverEngineRoot(EngineDiscoveryOrchestrator.java:160)
at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discoverSafely(EngineDiscoveryOrchestrator.java:134)
at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discover(EngineDiscoveryOrchestrator.java:108)
at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discover(EngineDiscoveryOrchestrator.java:80)
at org.junit.platform.launcher.core.DefaultLauncher.discover(DefaultLauncher.java:110)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86)
at org.junit.platform.launcher.core.DefaultLauncherSession D e l e g a t i n g L a u n c h e r . e x e c u t e ( D e f a u l t L a u n c h e r S e s s i o n . j a v a : 86 ) a t o r g . j u n i t . p l a t f o r m . l a u n c h e r . c o r e . S e s s i o n P e r R e q u e s t L a u n c h e r . e x e c u t e ( S e s s i o n P e r R e q u e s t L a u n c h e r . j a v a : 53 ) a t c o m . i n t e l l i j . j u n i t 5. J U n i t 5 I d e a T e s t R u n n e r . s t a r t R u n n e r W i t h A r g s ( J U n i t 5 I d e a T e s t R u n n e r . j a v a : 69 ) a t c o m . i n t e l l i j . r t . j u n i t . I d e a T e s t R u n n e r DelegatingLauncher.execute(DefaultLauncherSession.java:86) at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:53) at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:69) at com.intellij.rt.junit.IdeaTestRunner DelegatingLauncher.execute(DefaultLauncherSession.java:86)atorg.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:53)atcom.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:69)atcom.intellij.rt.junit.IdeaTestRunnerRepeater.startRunnerWithArgs(IdeaTestRunner.java:33)
at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:230)
at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:58)
Caused by: org.junit.platform.commons.JUnitException: MethodSelector [className = ‘com.example.DemoApplicationTests’, methodName = ‘contextLoads’, methodParameterTypes = ‘’] resolution failed
at org.junit.platform.launcher.listeners.discovery.AbortOnFailureLauncherDiscoveryListener.selectorProcessed(AbortOnFailureLauncherDiscoveryListener.java:39)
at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolveCompletely(EngineDiscoveryRequestResolution.java:102)
at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.run(EngineDiscoveryRequestResolution.java:82)
at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolver.resolve(EngineDiscoveryRequestResolver.java:113)
at org.junit.jupiter.engine.discovery.DiscoverySelectorResolver.resolveSelectors(DiscoverySelectorResolver.java:46)
at org.junit.jupiter.engine.JupiterTestEngine.discover(JupiterTestEngine.java:69)
at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discoverEngineRoot(EngineDiscoveryOrchestrator.java:152)
… 11 more
Caused by: org.junit.platform.commons.PreconditionViolationException: Could not load class with name: com.example.DemoApplicationTests
at org.junit.platform.engine.discovery.MethodSelector.lambda$lazyLoadJavaClass 0 ( M e t h o d S e l e c t o r . j a v a : 157 ) a t o r g . j u n i t . p l a t f o r m . c o m m o n s . f u n c t i o n . T r y 0(MethodSelector.java:157) at org.junit.platform.commons.function.Try 0(MethodSelector.java:157)atorg.junit.platform.commons.function.TryFailure.getOrThrow(Try.java:335)
at org.junit.platform.engine.discovery.MethodSelector.lazyLoadJavaClass(MethodSelector.java:156)
at org.junit.platform.engine.discovery.MethodSelector.getJavaClass(MethodSelector.java:135)
at org.junit.jupiter.engine.discovery.MethodSelectorResolver.resolve(MethodSelectorResolver.java:73)
at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.lambda$resolve$2(EngineDiscoveryRequestResolution.java:146)
at java.util.stream.ReferencePipeline$3 1. a c c e p t ( R e f e r e n c e P i p e l i n e . j a v a : 193 ) a t j a v a . u t i l . A r r a y L i s t 1.accept(ReferencePipeline.java:193) at java.util.ArrayList 1.accept(ReferencePipeline.java:193)atjava.util.ArrayListArrayListSpliterator.tryAdvance(ArrayList.java:1359)
at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126)
at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:499)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:486)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
at java.util.stream.FindOps F i n d O p . e v a l u a t e S e q u e n t i a l ( F i n d O p s . j a v a : 152 ) a t j a v a . u t i l . s t r e a m . A b s t r a c t P i p e l i n e . e v a l u a t e ( A b s t r a c t P i p e l i n e . j a v a : 234 ) a t j a v a . u t i l . s t r e a m . R e f e r e n c e P i p e l i n e . f i n d F i r s t ( R e f e r e n c e P i p e l i n e . j a v a : 464 ) a t o r g . j u n i t . p l a t f o r m . e n g i n e . s u p p o r t . d i s c o v e r y . E n g i n e D i s c o v e r y R e q u e s t R e s o l u t i o n . r e s o l v e ( E n g i n e D i s c o v e r y R e q u e s t R e s o l u t i o n . j a v a : 185 ) a t o r g . j u n i t . p l a t f o r m . e n g i n e . s u p p o r t . d i s c o v e r y . E n g i n e D i s c o v e r y R e q u e s t R e s o l u t i o n . r e s o l v e ( E n g i n e D i s c o v e r y R e q u e s t R e s o l u t i o n . j a v a : 125 ) a t o r g . j u n i t . p l a t f o r m . e n g i n e . s u p p o r t . d i s c o v e r y . E n g i n e D i s c o v e r y R e q u e s t R e s o l u t i o n . r e s o l v e C o m p l e t e l y ( E n g i n e D i s c o v e r y R e q u e s t R e s o l u t i o n . j a v a : 91 ) . . . 16 m o r e C a u s e d b y : j a v a . l a n g . C l a s s N o t F o u n d E x c e p t i o n : c o m . e x a m p l e . D e m o A p p l i c a t i o n T e s t s a t j a v a . n e t . U R L C l a s s L o a d e r . f i n d C l a s s ( U R L C l a s s L o a d e r . j a v a : 382 ) a t j a v a . l a n g . C l a s s L o a d e r . l o a d C l a s s ( C l a s s L o a d e r . j a v a : 424 ) a t s u n . m i s c . L a u n c h e r FindOp.evaluateSequential(FindOps.java:152) at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:464) at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolve(EngineDiscoveryRequestResolution.java:185) at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolve(EngineDiscoveryRequestResolution.java:125) at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolveCompletely(EngineDiscoveryRequestResolution.java:91) ... 16 more Caused by: java.lang.ClassNotFoundException: com.example.DemoApplicationTests at java.net.URLClassLoader.findClass(URLClassLoader.java:382) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher FindOp.evaluateSequential(FindOps.java:152)atjava.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)atjava.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:464)atorg.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolve(EngineDiscoveryRequestResolution.java:185)atorg.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolve(EngineDiscoveryRequestResolution.java:125)atorg.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolveCompletely(EngineDiscoveryRequestResolution.java:91)...16moreCausedby:java.lang.ClassNotFoundException:com.example.DemoApplicationTestsatjava.net.URLClassLoader.findClass(URLClassLoader.java:382)atjava.lang.ClassLoader.loadClass(ClassLoader.java:424)atsun.misc.LauncherAppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.junit.platform.commons.util.ReflectionUtils.lambda$tryToLoadClass 9 ( R e f l e c t i o n U t i l s . j a v a : 829 ) a t o r g . j u n i t . p l a t f o r m . c o m m o n s . f u n c t i o n . T r y . l a m b d a 9(ReflectionUtils.java:829) at org.junit.platform.commons.function.Try.lambda 9(ReflectionUtils.java:829)atorg.junit.platform.commons.function.Try.lambdacall$0(Try.java:57)
at org.junit.platform.commons.function.Try.of(Try.java:93)
at org.junit.platform.commons.function.Try.call(Try.java:57)
at org.junit.platform.commons.util.ReflectionUtils.tryToLoadClass(ReflectionUtils.java:792)
at org.junit.platform.commons.util.ReflectionUtils.tryToLoadClass(ReflectionUtils.java:748)
… 32 more

Process finished with exit code -2

在这里插入图片描述
都是因为maven启动器版本高了

出自https://zhuanlan.zhihu.com/p/465828482

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值