• mavne install 报错org.apache.maven.surefire.util.SurefireReflectionException: java.lang.reflect.InvocationTargetException


    maven install 报错

    org.apache.maven.surefire.util.SurefireReflectionException: java.lang.reflect.InvocationTargetException; nested exception is java.lang.reflect.InvocationTargetException: null
    java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
    at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
    at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
    at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
    at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
    Caused by: org.apache.maven.surefire.testset.TestSetFailedException: Unknown TestNG version 6.9.13.6
    at org.apache.maven.surefire.testng.TestNGExecutor.getConfigurator(TestNGExecutor.java:207)
    at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:72)
    at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:110)
    at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:106)
    ... 9 more

    Results :

    Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

    解决办法:

    pom.xml 文件中添加

    <build> 
        <plugins>          
           <plugin>      
            <groupId>org.apache.maven.plugins</groupId>          
            <artifactId>maven-surefire-plugin</artifactId>          
            <version>2.19.1</version>        
            <configuration>            
            <skipTests>false</skipTests>        
            </configuration>      
            </plugin>  
         </plugins> 
    </build>
  • 相关阅读:
    千里之行,始于足下
    Asp.Net构架(Http请求处理流程)
    c# MVC5(二) MVC与IOC结合
    c# MVC5(一) 初步认识以及新建mvc
    使用C#创建Windows服务
    Cron Expressions——Cron 表达式(QuartZ调度时间配置)
    定时调度之Quartz
    ORM之EF初识
    Redis原理及使用
    为什么使用 Redis 及其产品定位
  • 原文地址:https://www.cnblogs.com/testway/p/6124910.html
Copyright © 2020-2023  润新知