private static SonarScanner newAnalysis() {
SonarScanner analysis = SonarScanner.create(Project.basedir());
- analysis.setEnvironmentVariable("SONAR_RUNNER_OPTS", "-XX:MaxPermSize=128m");
// required to bypass usage of build-wrapper
analysis.setProperties("sonar.cfamily.build-wrapper-output.bypass", "true");
<skipServerTests>false</skipServerTests>
<skipSanityChecks>false</skipSanityChecks>
- <argLine>-Xmx512m -Djava.awt.headless=true -XX:MaxPermSize=160m</argLine>
+ <argLine>-Xmx512m -Djava.awt.headless=true</argLine>
<maven.test.redirectTestOutputToFile>true</maven.test.redirectTestOutputToFile>
<!-- used for deployment to SonarSource Artifactory -->
"-XX:+HeapDumpOnOutOfMemoryError");
defaults.put(ProcessProperties.SEARCH_JAVA_ADDITIONAL_OPTS, "");
- defaults.put(ProcessProperties.WEB_JAVA_OPTS, "-Xmx512m -Xms128m -XX:MaxPermSize=160m -XX:+HeapDumpOnOutOfMemoryError -Djava.net.preferIPv4Stack=true");
+ defaults.put(ProcessProperties.WEB_JAVA_OPTS, "-Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Djava.net.preferIPv4Stack=true");
defaults.put(ProcessProperties.WEB_JAVA_ADDITIONAL_OPTS, "");
- defaults.put(ProcessProperties.CE_JAVA_OPTS, "-Xmx512m -Xms128m -XX:MaxPermSize=160m -XX:+HeapDumpOnOutOfMemoryError -Djava.net.preferIPv4Stack=true");
+ defaults.put(ProcessProperties.CE_JAVA_OPTS, "-Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Djava.net.preferIPv4Stack=true");
defaults.put(ProcessProperties.CE_JAVA_ADDITIONAL_OPTS, "");
defaults.put(ProcessProperties.JDBC_MAX_ACTIVE, "60");
defaults.put(ProcessProperties.JDBC_MAX_IDLE, "5");
# The HotSpot Server VM is recommended. The property -server should be added if server mode
# is not enabled by default on your environment: http://docs.oracle.com/javase/7/docs/technotes/guides/vm/server-class.html
#
-#sonar.web.javaOpts=-Xmx512m -Xms128m -XX:MaxPermSize=160m -XX:+HeapDumpOnOutOfMemoryError -Djava.net.preferIPv4Stack=true
+#sonar.web.javaOpts=-Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Djava.net.preferIPv4Stack=true
# Same as previous property, but allows to not repeat all other settings like -Xmx
#sonar.web.javaAdditionalOpts=
# The HotSpot Server VM is recommended. The property -server should be added if server mode
# is not enabled by default on your environment: http://docs.oracle.com/javase/7/docs/technotes/guides/vm/server-class.html
#
-#sonar.ce.javaOpts=-Xmx512m -Xms128m -XX:MaxPermSize=160m -XX:+HeapDumpOnOutOfMemoryError -Djava.net.preferIPv4Stack=true
+#sonar.ce.javaOpts=-Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Djava.net.preferIPv4Stack=true
# Same as previous property, but allows to not repeat all other settings like -Xmx
#sonar.ce.javaAdditionalOpts=
.addPlugin(FileLocation.byWildcardMavenFilename(new File("../../plugins/sonar-xoo-plugin/target"), "sonar-xoo-plugin-*.jar"))
.setServerProperty(
"sonar.web.javaOpts",
- String.format("-Xms%dm -Xmx%dm -XX:+HeapDumpOnOutOfMemoryError -XX:MaxPermSize=160m -Djava.awt.headless=true", MAX_HEAP_SIZE_IN_MEGA, MAX_HEAP_SIZE_IN_MEGA))
+ String.format("-Xms%dm -Xmx%dm -XX:+HeapDumpOnOutOfMemoryError -Djava.awt.headless=true", MAX_HEAP_SIZE_IN_MEGA, MAX_HEAP_SIZE_IN_MEGA))
.setServerProperty("sonar.log.level", "DEBUG")
.restoreProfileAtStartup(FileLocation.ofClasspath("/one-xoo-issue-per-line.xml"))
.build();
"sonar.sources", "",
"sonar.showProfiling", "true");
scanner
- .setEnvironmentVariable("SONAR_RUNNER_OPTS", "-Xmx512m -server -XX:MaxPermSize=64m")
+ .setEnvironmentVariable("SONAR_RUNNER_OPTS", "-Xmx512m -server")
.setProjectDir(manyFlatModulesBaseDir);
BuildResult result = orchestrator.executeBuild(scanner);
"sonar.projectVersion", "1.0",
"sonar.sources", "",
"sonar.showProfiling", "true");
- scanner.setEnvironmentVariable("SONAR_RUNNER_OPTS", "-Xmx512m -server -XX:MaxPermSize=64m");
+ scanner.setEnvironmentVariable("SONAR_RUNNER_OPTS", "-Xmx512m -server");
scanner.setProjectDir(manyNestedModulesBaseDir);
BuildResult result = orchestrator.executeBuild(scanner);
"sonar.sources", "src",
"sonar.analysis.mode", "issues",
"sonar.showProfiling", "true")
- .setEnvironmentVariable("SONAR_RUNNER_OPTS", "-Xmx" + xmx + "m -server -XX:MaxPermSize=64m")
+ .setEnvironmentVariable("SONAR_RUNNER_OPTS", "-Xmx" + xmx + "m -server")
.setProjectDir(baseDir);
orchestrator.executeBuild(runner);
"sonar.projectVersion", "1.0",
"sonar.sources", "src",
"sonar.showProfiling", "true");
- scanner.setEnvironmentVariable("SONAR_RUNNER_OPTS", "-Xmx512m -server -XX:MaxPermSize=64m")
+ scanner.setEnvironmentVariable("SONAR_RUNNER_OPTS", "-Xmx512m -server")
.setProjectDir(baseDir);
BuildResult result = orchestrator.executeBuild(scanner);
orchestrator.getServer().provisionProject("sample", "xoo-sample");
orchestrator.getServer().associateProjectToQualityProfile("sample", "xoo", "one-xoo-issue-per-line");
SonarScanner runner = newScanner(
- "-Xmx512m -server -XX:MaxPermSize=64m",
+ "-Xmx512m -server",
"sonar.analysis.mode", "issues",
"sonar.userHome", userHome.getAbsolutePath(),
"sonar.showProfiling", "true");
"sonar.projectVersion", "1.0",
"sonar.sources", "",
"sonar.showProfiling", "true");
- scanner.setEnvironmentVariable("SONAR_RUNNER_OPTS", "-Xmx512m -server -XX:MaxPermSize=64m")
+ scanner.setEnvironmentVariable("SONAR_RUNNER_OPTS", "-Xmx512m -server")
.setProjectDir(baseDir);
BuildResult result = orchestrator.executeBuild(scanner);
.builderEnv()
.addPlugin(FileLocation.byWildcardMavenFilename(new File("../../plugins/sonar-xoo-plugin/target"), "sonar-xoo-plugin-*.jar"))
// should not be so high, but required as long embedded h2 is used -> requires more memory on server
- .setServerProperty("sonar.web.javaOpts", "-Xmx1G -XX:MaxPermSize=100m -XX:+HeapDumpOnOutOfMemoryError")
+ .setServerProperty("sonar.web.javaOpts", "-Xmx1G -XX:+HeapDumpOnOutOfMemoryError")
// Needed by DuplicationTest::hugeJavaFile
.setOrchestratorProperty("javaVersion", "LATEST_RELEASE").addPlugin("java")
.restoreProfileAtStartup(FileLocation.ofClasspath("/one-xoo-issue-per-line.xml"))
// ES + TOMCAT
@Test
public void server_startup_and_shutdown() throws Exception {
- String defaultWebJavaOptions = "-Xmx768m -XX:MaxPermSize=160m -XX:+HeapDumpOnOutOfMemoryError -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djruby.management.enabled=false";
+ String defaultWebJavaOptions = "-Xmx768m -XX:+HeapDumpOnOutOfMemoryError -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djruby.management.enabled=false";
Orchestrator orchestrator = Orchestrator.builderEnv()
.setOrchestratorProperty("javaVersion", "LATEST_RELEASE")
.addPlugin("java")