Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -123,6 +124,7 @@ public void execute() throws MojoExecutionException, MojoFailureException {

List<String> q7VmArgs = new ArrayList<String>();
String[] userArgs = getQ7Coords().getVmArgs();

if (userArgs == null || userArgs.length == 0) {
q7VmArgs.addAll(asList(DEFAULT_Q7_VM_ARGS));
if (java.hasPermGen()) {
Expand All @@ -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);
}
Expand Down Expand Up @@ -328,6 +334,16 @@ public void run() {
}
};

private static boolean containsProperty(List<String> 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()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<String, Version> versions = targetPlatform.getVersions();
Expand Down
Loading