diff --git a/core/src/test/java/org/elasticsearch/test/junit/listeners/ReproduceInfoPrinter.java b/core/src/test/java/org/elasticsearch/test/junit/listeners/ReproduceInfoPrinter.java index 8d2caadbcd7..a824ec7def9 100644 --- a/core/src/test/java/org/elasticsearch/test/junit/listeners/ReproduceInfoPrinter.java +++ b/core/src/test/java/org/elasticsearch/test/junit/listeners/ReproduceInfoPrinter.java @@ -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()); diff --git a/pom.xml b/pom.xml index 1e66ac97cd5..649b4cc9be2 100644 --- a/pom.xml +++ b/pom.xml @@ -623,6 +623,7 @@ ${tests.appendseed} ${tests.cluster} ${tests.iters} + ${project.groupId}:${project.artifactId} ${tests.maxfailures} ${tests.failfast} ${tests.class}