Reputation:
What is the best way to add JVM options to the program started by mvn spring-boot:run
?
Upvotes: 19
Views: 22186
Reputation: 592
Now it is:
mvn spring-boot:run -Dspring-boot.run.jvmArguments="-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005"
Upvotes: 13
Reputation: 3561
You can configure spring-boot-maven-plugin
to always include you jvm options when run:
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<jvmArguments>
-Dapp.name=test
</jvmArguments>
</configuration>
</plugin>
Or if you don't need that arguments to stay permanently, use this on the command line:
mvn spring-boot:run -Drun.jvmArguments="..."
Check documentation for details.
Upvotes: 22