xerno opened a new issue, #9337:
URL: https://github.com/apache/netbeans/issues/9337
### Apache NetBeans version
Apache NetBeans 29
### What happened
Maven accepts both -T 2 (two tokens) and -T2 (single token) as equivalent
parallel build syntax. In the NetBeans Goals field, these naturally produce
different nbactions.xml structures:
- -T 2 -> ```<goal>-T</goal><goal>2</goal>``` - works correctly, parallel
build detected, output displays fine
- -T2 -> ```<goal>-T2</goal>``` - build runs fine, but Output window
throws NPE:
```
java.lang.NullPointerException: Cannot read field "type" because "start"
is null
at
o.n.m.maven.execute.CommandLineOutputHandler.trimTree(CommandLineOutputHandler.java:588)
at
o.n.m.maven.execute.CommandLineOutputHandler.processExecEvent(CommandLineOutputHandler.java:475)
at
o.n.m.maven.execute.CommandLineOutputHandler$Output.run(CommandLineOutputHandler.java:293)
```
It appears that the compact form is not recognized as a parallel build, so
the output tree-folding stays active and crashes on interleaved events from
concurrent modules.
Workaround: Use -T 2 (with space) instead of -T2 in the Goals field.
### Language / Project Type / NetBeans Component
Java Maven multi-module project
### How to reproduce
1. Open any Maven multi-module project with at least 2 independent modules
2. In the Goals field (or directly in nbactions.xml), configure a build
action with -T2 as a single goal:
```
<goals>
<goal>-T2</goal>
<goal>clean</goal>
<goal>install</goal>
</goals>
```
3. Run the action
4. Observe the Output window — build succeeds but the output tree is
corrupted and the NPE appears
For comparison, change to -T 2 (two separate goals):
```
<goals>
<goal>-T</goal>
<goal>2</goal>
<goal>clean</goal>
<goal>install</goal>
</goals>
```
This works correctly.
### Did this work correctly in an earlier version?
No / Don't know
### Operating System
Mac OS X version 26.5 / aarch64
### JDK
OpenJDK 64-Bit Server VM 25.0.2+10-LTS
### Apache NetBeans packaging
Apache NetBeans binary zip
### Anything else
Related:
- #5479
- #3675
### Are you willing to submit a pull request?
Yes
--
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