maven项目 打包的时候出现以下错误 org.apache.maven.plugins:maven-surefire-plugin:2.5:test (default-test) on proje

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.5:test (default-test) on project omini-impl: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.5:test failed. NullPointerException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.5:test (default-test) on project omini-impl: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.5:test failed.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:211)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:140)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)

 

 

解决办法 :

一是命令行,
mvn clean package -Dmaven.test.skip=true

二是写入pom文件,



org.apache.maven.plugins
maven-surefire-plugin
2.6

true


你可能感兴趣的:(maven项目 打包的时候出现以下错误 org.apache.maven.plugins:maven-surefire-plugin:2.5:test (default-test) on proje)