...
Code Block | ||
---|---|---|
| ||
<action> <actionName>run.continuous</actionName> <packagings> <packaging>jar</packaging> </packagings> <!-- Maybe not necessary to add, if the MavenActionsProvider itself are registered specifically per-plugin <activation> <plugin>io.micronaut.build:micronaut-maven-plugin</plugin> </activation> --> <goals> <goal>process-classes</goal> <goal>io.micronaut.build:micronaut-maven-plugin:2.0.0:run</goal> </goals> <properties> <exec.vmArgs></exec.vmArgs> <exec.args>$<mn.jvmArgs>${exec.vmArgs} -classpath %classpath ${exec.mainClass} ${exec.appArgs}</exec.args>%classpath</mn.jvmArgs> <exec.appArgs></exec<mn.appArgs>${exec.appArgs</mn.appArgs> <exec.mainClass>${packageClassName}</exec.mainClass> <exec.executable>java</exec.executable> </properties> </action> |
...
- Selection of the main class: if not defined, UI shows up, eventually recording user's choices in nbactions.xml
- Java platform selection
- StartupExtender VM parameters merge
- ExplicitProcessParameters processing
...
Micronaut Maven Plugin
While exec:exec goal honours system property exec.executable, that eventually specifies the desired Java executable to be used for application launch, Micronaut maven plugin does not honour any such property and relies on toolchains in maven. NetBeans do not support toolchains much, and our LSP clients also manage JDKs in a different way, not using maven toolchains. Java platform selection will be broken for mn:run goal, unless the whole maven runs on the target JDK.
The Micronaut plugin does not honour the following properties we need to transfer parameters from the IDE, or LSP client:
- mn.jvmArgs - just plugin configuration property is supported, not system property on commandline
- mn.appArg - just plugin configuration property is supported, not system property on commandline
- exec.executable - not supported at all, even as configuration propertyu
- exec.args - whole composed command line
The simplest solution is to enhance the mn:run goal to support some 'exec.executable'-like (i.e. mn.executable) property with a similar semantics.
...