How to print the actual MAVEN_OPTIONS that are being used?

后端 未结 5 1207
一个人的身影
一个人的身影 2021-02-20 03:35

Is there a way to get maven to output the value of environment and maven variables during a build? This would be very useful for debugging things when they\'re going wrong.

5条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-20 04:14

    Adding an option to the already provided answers.

    There are different ways to pass JVM options to mvn as per https://maven.apache.org/configure.html you can do it using environment variable (MAVEN_OPTS) or file (${maven.projectBasedir}/.mvn/jvm.config).

    I wanted to see which is picked up, and did so by starting a build then followed a ps listing to assert what was picked up, eg

    ps -ef | grep SomeOption
    

提交回复
热议问题