我有一个 Maven 项目,我想获得所有测试类及其文件路径的列表,而不必执行所有测试。
运行“mvn test”后,我在 target/下的唯一文件是
checkstyle-cachefile checkstyle-checker.xml checkstyle-result.xml maven-shared-archive-resources
我想要一些非常通用的东西,不需要我编辑 pom.xml 文件。
最佳答案
就我而言,测试类名称存储在
target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst
您可以运行 mvn test-compile
在不运行测试的情况下创建它。
关于Maven - 获取所有测试的列表而不运行它们?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50417039/