Split up memory option to min and maxmemory
This commit is contained in:
@@ -17,12 +17,20 @@ import java.util.List;
|
||||
@Mojo(name = "run")
|
||||
public class RunServerMojo extends AbstractMojo {
|
||||
/**
|
||||
* Heap size passed to both {@code -Xmx} and {@code -Xms}.
|
||||
* Accepts standard JVM memory notation, e.g. <code>2G</code>, <code>512M</code>.
|
||||
* Minimum heap size passed to {@code -Xms}.
|
||||
* Accepts standard JVM memory notation, e.g. <code>512M</code>, <code>1G</code>.
|
||||
* Defaults to <code>512M</code>.
|
||||
*/
|
||||
@Parameter(defaultValue = "512M")
|
||||
private String minMemory;
|
||||
|
||||
/**
|
||||
* Maximum heap size passed to {@code -Xmx}.
|
||||
* Accepts standard JVM memory notation, e.g. <code>2G</code>, <code>4G</code>.
|
||||
* Defaults to <code>2G</code>.
|
||||
*/
|
||||
@Parameter(defaultValue = "2G")
|
||||
private String memory;
|
||||
private String maxMemory;
|
||||
|
||||
/**
|
||||
* Additional JVM arguments to pass to the server process.
|
||||
@@ -84,7 +92,7 @@ public class RunServerMojo extends AbstractMojo {
|
||||
@Override
|
||||
public void execute() throws MojoExecutionException, MojoFailureException {
|
||||
Step<?> step = new ServerRunStep(getLog(),
|
||||
new ServerRunStepConfig(memory, jvmArgs, remoteDebug, debugPort, port, serverDirectory, serverJarName)
|
||||
new ServerRunStepConfig(minMemory, maxMemory, jvmArgs, remoteDebug, debugPort, port, serverDirectory, serverJarName)
|
||||
);
|
||||
try {
|
||||
step.run();
|
||||
|
||||
Reference in New Issue
Block a user