简体   繁体   中英

On Jenkins, Sonar post job MAVEN_OPTS doesn't seem to work

On a particular Jenkins job, i need to configure the JVM PermSize and MaxPermSize for the Maven execution launched by Sonar.

I'll try different combinations that didn't work, mainly the MAVEN_OPTS fields, both on the main Jenkins build and on the Sonar post-job configuration.

The command-line displayed in the job log concerning Sonar is :

"D:\Program Files\<some-project>\pom.xml" -e -B sonar:sonar -Dsonar.jdbc.driver=com.mysql.jdbc.Driver "-Dsonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8" ******** ******** -Dsonar.host.url=http://<some-host>/sonar

So, no JVM options set. For the record, my wanted options are :

-XX:PermSize=512m -XX:MaxPermSize=512m

Environnement:

  • Windows 2008
  • Jenkins 1.554.3
  • Maven 3.0.3
  • Sonar 3.7
  • Sonar Jenkins Plugin : 2.1

Thank you !

For the unitary tests for example, Maven forked the Java process and the JVM options set with MAVEN_OPTS are not taken into account.

Maybe it's the same for the Sonar analysis.

If you are using a Maven profile to launch your Sonar analysis, can you check if you can set the JMV options in the <argLine> section?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM