Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Passing JVM args to SpringBoot bootRun Gradle task [duplicate]

I would like to pass some JVM args to my Gradle bootRun task, namely -Xbootclasspath. I have added:

bootRun {
    systemProperties = System.properties
}

to my build.gradle file, but it doesn't like it when I run:

gw bootRun -Xbootclasspath/p:....

I get the error:

Unknown command-line option '-X'.

Am I perhaps running this incorrectly, or is System.properties not the correct approach for what I am looking?

like image 276
MeanwhileInHell Avatar asked Aug 17 '17 16:08

MeanwhileInHell


1 Answers

Got it working by using jvmArgs, as detailed in this SO question [ How to pass JVM options from bootRun ]

bootRun {
    jvmArgs = ["-Xbootclasspath/p:<fully-qualified-path-to-jar>"]
}
like image 123
MeanwhileInHell Avatar answered Nov 20 '22 02:11

MeanwhileInHell