Fix reproduction line to include project filters

Today on a failure the reproduce line printed out by the test framework
will build all projects and might fail if the test class is not present.
This commit adds a reactor filter to the reproduction line to ensure
unrelated projects are skipped.

Closes #12838
This commit is contained in:
Simon Willnauer 2015-08-14 21:36:49 +02:00
parent db1e83884f
commit bba34de6b3
2 changed files with 6 additions and 1 deletions

View File

@ -78,10 +78,14 @@ public class ReproduceInfoPrinter extends RunListener {
final StringBuilder b = new StringBuilder();
if (inVerifyPhase()) {
b.append("REPRODUCE WITH: mvn verify -Pdev -Dskip.unit.tests");
b.append("REPRODUCE WITH: mvn verify -Pdev -Dskip.unit.tests" );
} else {
b.append("REPRODUCE WITH: mvn test -Pdev");
}
String project = System.getProperty("tests.project");
if (project != null) {
b.append(" -pl " + project);
}
MavenMessageBuilder mavenMessageBuilder = new MavenMessageBuilder(b);
mavenMessageBuilder.appendAllOpts(failure.getDescription());

View File

@ -623,6 +623,7 @@
<tests.appendseed>${tests.appendseed}</tests.appendseed>
<tests.cluster>${tests.cluster}</tests.cluster>
<tests.iters>${tests.iters}</tests.iters>
<tests.project>${project.groupId}:${project.artifactId}</tests.project>
<tests.maxfailures>${tests.maxfailures}</tests.maxfailures>
<tests.failfast>${tests.failfast}</tests.failfast>
<tests.class>${tests.class}</tests.class>