Skip to content

Commit

Permalink
SDK-227 When using multiple JAVA versions the OpenMRS SDK ignores MAV…
Browse files Browse the repository at this point in the history
…EN_OPTS setting
  • Loading branch information
rkorytkowski committed Dec 11, 2017
1 parent 82a9ace commit cab5a1d
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,13 @@ private void runInFork(Server server) throws MojoExecutionException, MojoFailure

String mavenOpts = mavenSession.getRequest().getUserProperties().getProperty("MAVEN_OPTS");
if (StringUtils.isBlank(mavenOpts)) {
mavenOpts = mavenSession.getRequest().getSystemProperties().getProperty("MAVEN_OPTS", "");
mavenOpts = mavenSession.getRequest().getUserProperties().getProperty("env.MAVEN_OPTS");
}
if (StringUtils.isBlank(mavenOpts)) {
mavenOpts = mavenSession.getRequest().getSystemProperties().getProperty("MAVEN_OPTS");
}
if (StringUtils.isBlank(mavenOpts)) {
mavenOpts = mavenSession.getRequest().getSystemProperties().getProperty("env.MAVEN_OPTS");
}

mavenOpts = adjustXmxToAtLeast(mavenOpts, 768);
Expand Down

0 comments on commit cab5a1d

Please sign in to comment.