sdedic opened a new pull request, #6805:
URL: https://github.com/apache/netbeans/pull/6805

   I have realized that when you use Micronaut module's `dev mode`, with 
continuous rebuild/restart supported by Maven plugin, the IDE's project 
customizer does not work that well.
   
   First of all, it seems that when I try to work with micronaut-provided 
configuration change some mapping to it, a NPE is printed to the console during 
write:
   ```
   java.lang.NullPointerException: Cannot invoke "java.util.List.iterator()" 
because the return value of 
"org.netbeans.modules.maven.configurations.M2Configuration.getActivatedProfiles()"
 is null
        at 
org.netbeans.modules.maven.configurations.M2ConfigProvider.writeAuxiliaryData(M2ConfigProvider.java:538)
        at 
org.netbeans.modules.maven.configurations.M2ConfigProvider.setConfigurations(M2ConfigProvider.java:310)
        at 
org.netbeans.modules.maven.customizer.CustomizerProviderImpl.writeAll(CustomizerProviderImpl.java:364)
        at 
org.netbeans.modules.maven.customizer.CustomizerProviderImpl$OptionListener.actionPerformed(CustomizerProviderImpl.java:333)
        at 
org.netbeans.modules.project.uiapi.CustomizerDialog$OptionListener$2$1$1.run(CustomizerDialog.java:289)
        at org.openide.filesystems.FileUtil$2.run(FileUtil.java:420)
   ```
   This is caused by missing initialization of member variables in 
M2Configuration and is fixed TBD.
   
   More important is that the UI for Run is completely disabled for Micronaut. 
This is becuase Micronaut uses `mn:run` goal, which is not recognized as 
'executable' - NB evaluates the mapping to be incompatibly customized by the 
user and refuse to enable the Run arguments customizer:
   
![disabled-customizer](https://github.com/apache/netbeans/assets/26788611/d2d28db4-5a47-4eb4-8e95-627e9218d56e)
   
   So I've added a way how a plugin (Micronaut support) can inform the Maven 
core that there's a goal that works similar to Run. This makes the customizer 
to be enabled.
   
   The last change is to properly map Micronaut devmode's Run parameters to 
goal parameters. While NB uses `exec.vmArgs` and `exec.appArgs` to configure 
arguments to the VM and application, and passes them in `exec.args` to the 
`exec:exec` plugin, the Micronaut maven plugin recognizes none of these 
properties. So I've changed the action mapping in Micronaut module to use 
`mn.vmArgs` and `vm.appArgs` as described in the plugin's documentation.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to