Repository navigation
Closed
Description
Apache NetBeans version
Apache NetBeans 13 release candidate
What happened
When the maven option of -T is configured in a multi-module reactor, in my example in the .mvn/maven.config, the output window loses track of the folding and this throws;
java.lang.NullPointerException: Cannot invoke "org.openide.windows.FoldHandle.silentStartFold(boolean)" because "parentProject.foldHandle" is null
at org.netbeans.modules.maven.execute.cmd.ExecutionEventObject$Tree.startFold(ExecutionEventObject.java:179)
at org.netbeans.modules.maven.execute.CommandLineOutputHandler$Output.run(CommandLineOutputHandler.java:352)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
The build continues in the background but the output is stalled. I have not had an opportunity to dig into this yet, but I will do so and provide more detailed understanding when my project commitment is lessoned.
I am using a maven pom that contains significant number of plugins that are run for each member module.
How to reproduce
- Create a multi-module reactor
- Configure to build in parallel
- Run using Clean & Build control
Did this work correctly in an earlier version?
No
Operating System
Mac OS X version 12.2.1 running on x86_64
JDK
OpenJDK Runtime Environment 17.0.2+8-LTS
Apache NetBeans packaging
Apache NetBeans provided installer
Anything else
No response
Are you willing to submit a pull request?
No response
Code of Conduct
Yes
Activity
jglick commentedon Nov 10, 2022
Long broken. Happens in 16-rc3 when running SpotBugs in a multimodule reactor using mvnd.
jglick commentedon Nov 10, 2022
Long broken. Can be reproduced in trunk (running IDE on Java 17 if it matters):
-DskipTests.Has something to do with the forked execution of https://spotbugs.github.io/spotbugs-maven-plugin/check-mojo.html.
Unfortunately the obvious quick fixes like
do not work—you just get NPEs later from a variety of other methods here or in
CommandLineOutputHandler. There is a lot of complex, sparsely commented logic here with numerous unchecked accesses to supposedly nullable fields, and no test coverage that I can find. Other than a small patch in #2309, the code all seems to predate the Apache donation.