jenkins 对 maven对应的 jvm 配置参数

一旦在系统上配置了 MAVEN_OPTS 环境变量

那么在 jenkens 配置参数将无效

jenkins 对 maven对应的 jvm 配置参数_第1张图片


在linux  .bashrc中设置环境变量如下:

export PATH=$PATH:$NODE_HOME/bin/
export GULP_HOME=/opt/CI/node-v6.9.1-linux-x64/lib/node_modules/gulp
export PATH=$PATH:$GULP_HOME/bin/

export MAVEN_OPTS="-Dfile.encoding=UTF-8 -XX:NewSize=128m -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps"


官方说明配置:https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner+for+Maven

Troubleshooting

If you get an java.lang.OutOfMemoryError, you can set the MAVEN_OPTS environment variable, like this in *nix environments:

export MAVEN_OPTS="-Xmx512m"

On Windows environments, avoid the double-quotes, since they get misinterpreted.

set MAVEN_OPTS=-Xmx512m




你可能感兴趣的:(maven)