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
- Open any Maven multi-module project with at least 2 independent modules
- 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>
- Run the action
- 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:
Are you willing to submit a pull request?
Yes
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:
<goal>-T</goal><goal>2</goal>- works correctly, parallel build detected, output displays fine<goal>-T2</goal>- build runs fine, but Output window throws NPE: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
For comparison, change to -T 2 (two separate 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:
Are you willing to submit a pull request?
Yes