我的pom.xml有以下内容
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.18.1</version>
<configuration>
<outputDirectory>${basedir}/target/surefire-reports</outputDirectory>
</configuration>
</plugin>
当我运行mvn surefire-report :: report我正在关注
[INFO] Scanning for projects...
[INFO]
[INFO] -----------------------------------------------------------------------
[INFO] Building TestApp 0.0.1-SNAPSHOT
[INFO] -----------------------------------------------------------------------
[INFO]
[INFO] >>> maven-surefire-report-plugin:2.18.1:report (default-cli) > [surefir
test @ TestApp >>>
[WARNING] The POM for org.testng:testng:jar:5.14.3 is invalid, transitive depe
encies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for org.testng:testng:jar:5.14.4 is invalid, transitive depe
encies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for org.testng:testng:jar:5.14.5 is invalid, transitive depe
encies (if any) will not be available, enable debug logging for more details
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ TestApp
-
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources
i.e. build is platform dependent!
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ TestApp ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @
stApp ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources
i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory C:\Users\nikhil.udgirkar\workspace\
stApp\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ TestA
---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ TestApp ---
[INFO]
[INFO] <<< maven-surefire-report-plugin:2.18.1:report (default-cli) < [surefir
test @ TestApp <<<
[INFO]
[INFO] --- maven-surefire-report-plugin:2.18.1:report (default-cli) @ TestApp
-
[WARNING] Unable to locate Test Source XRef to link to - DISABLED
[INFO] -----------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] -----------------------------------------------------------------------
[INFO] Total time: 3.316 s
[INFO] Finished at: 2016-09-26T12:37:33+05:30
[INFO] Final Memory: 17M/215M
[INFO] ---------------------------------------------------------------------
当我发出以下命令时,我收到空白报告
mvn surefire-report:report
我可以在其各自的文件夹中获取.class文件
感谢您的时间