membersound
membersound

Reputation: 86637

How to set a default -vm option for maven build in eclipse?

The Run As > Maven build... command in eclipse has a VM Arguments tab.

How can I force eclipse to always insert a default vmarg there during compilation? Eg -Xmx1g? Is that possible at all?

Sidenote: I don't want to give eclipse itself the -Xmx vmarg (like eclipse.ini). But the mvn compilation process!

Upvotes: 1

Views: 8911

Answers (2)

KayV
KayV

Reputation: 13835

Use the following process Right Click on Project > Run As > Run Configuration.

In the next window, select Maven Build in left and add new Configuration. In the same window, under the JRE tab, you can add on your default VM arguments.

Upvotes: 0

Ramachandran.A.G
Ramachandran.A.G

Reputation: 4948

One way is to set that in the JRE VM args option in the IDE run configuration.

enter image description here

Quick thing , this can be set at a plugin level as well , https://maven.apache.org/plugins/maven-compiler-plugin/examples/compile-with-memory-enhancements.html which will then be used during run.

Upvotes: 1

Related Questions