-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add third execution mode to enable jvm parameters such as --enable-preview #345
Comments
Do you mean that using arguments, commandlineArgs for that purpose is not possible? |
Maybe it is my misunderstanding, but from the doc and the source code I infer that the command line arguments are passed to the program, as the args to |
This works for me <plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>java</executable>
<arguments>
<argument>--enable-preview</argument>
<argument>MyClass</argument>
<argument>a</argument>
<argument>b</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin> Not sure which |
You can set the JVM args using |
It appears not possible to add jvm parameters.
A use case is to execute the built product in a maven project with special (e.g. --enable-preview) jvm parameters.
The execution mode is similar to exec with an additional parameter (or parameters) to add jvm parameters,
such that e.g. --enable-preview or -Xmx512 can be passed.
This would be useful for new features and would allow starting the maven project from the IDE (with a specific configuration).
The text was updated successfully, but these errors were encountered: