diff --git a/maven-plugin/rcptt-maven-plugin/src/main/java/org/eclipse/rcptt/maven/ExecuteMojo.java b/maven-plugin/rcptt-maven-plugin/src/main/java/org/eclipse/rcptt/maven/ExecuteMojo.java index d283837ba..9794a8698 100644 --- a/maven-plugin/rcptt-maven-plugin/src/main/java/org/eclipse/rcptt/maven/ExecuteMojo.java +++ b/maven-plugin/rcptt-maven-plugin/src/main/java/org/eclipse/rcptt/maven/ExecuteMojo.java @@ -83,6 +83,7 @@ public class ExecuteMojo extends AbstractRCPTTMojo { private static final String RUNNER_PLATFORM = "-runnerPlatform"; private static final String TESTENGINE = "-testEngine"; private static final String ENABLE_SOFTWARE_INSTALLATION = "-enableSoftwareInstallation"; + private static final String RUNNER_PROGRESS_PROPERTY = "rcptt.runner.target_progress"; private static int shutdownListenerPort; private static final String[] DEFAULT_Q7_VM_ARGS = new String[] { "-Xms256m", "-Xmx512m", @@ -123,6 +124,7 @@ public void execute() throws MojoExecutionException, MojoFailureException { List q7VmArgs = new ArrayList(); String[] userArgs = getQ7Coords().getVmArgs(); + if (userArgs == null || userArgs.length == 0) { q7VmArgs.addAll(asList(DEFAULT_Q7_VM_ARGS)); if (java.hasPermGen()) { @@ -132,6 +134,10 @@ public void execute() throws MojoExecutionException, MojoFailureException { q7VmArgs.addAll(asList(userArgs)); } + if (!containsProperty(q7VmArgs, RUNNER_PROGRESS_PROPERTY)) { + q7VmArgs.add("-D" + RUNNER_PROGRESS_PROPERTY + "=" + getLog().isDebugEnabled()); + } + for (String arg : q7VmArgs) { cmd.createArg().setValue(arg); } @@ -328,6 +334,16 @@ public void run() { } }; + private static boolean containsProperty(List args, String property) { + String prefix = "-D" + property + "="; + for (String arg : args) { + if (arg.startsWith(prefix)) { + return true; + } + } + return false; + } + private String getImports() throws MojoFailureException { StringBuilder sb = new StringBuilder(); for (File file : getProjectsDir().listFiles()) { diff --git a/runner/org.eclipse.rcptt.runner/src/org/eclipse/rcptt/runner/util/TargetPlatformChecker.java b/runner/org.eclipse.rcptt.runner/src/org/eclipse/rcptt/runner/util/TargetPlatformChecker.java index fcf51ebb4..f59e1c173 100644 --- a/runner/org.eclipse.rcptt.runner/src/org/eclipse/rcptt/runner/util/TargetPlatformChecker.java +++ b/runner/org.eclipse.rcptt.runner/src/org/eclipse/rcptt/runner/util/TargetPlatformChecker.java @@ -79,7 +79,9 @@ private void initializeTargetPlatform() throws CoreException { targetPlatform = null; compatibility = null; String location = PDELocationUtils.getProductLocation(conf.location).getAbsolutePath(); - PrintStreamMonitor outMonitor = new PrintStreamMonitor(true); + boolean progressEnabled = Boolean.parseBoolean(System.getProperty("rcptt.runner.target_progress", "true")); + + PrintStreamMonitor outMonitor = new PrintStreamMonitor(progressEnabled); if (conf.config != null) { targetPlatform = TargetPlatformManager.createTargetPlatform(location, outMonitor); Map versions = targetPlatform.getVersions();