SapiensAnatis opened a new issue, #1271:
URL: https://github.com/apache/maven-mvnd/issues/1271

   I'm running into a strange issue with 
[spotless](https://github.com/diffplug/spotless) where `mvnd` is throwing what 
looks like an NPE after the goal completes:
   
   ```
   $ mvnd spotless:apply 
-DspotlessIdeHook=/home/jay/Projects/mvnd-npe-repro/src/main/java/com/mycompany/app/App.java
  
   [INFO] Processing build on daemon 280ce708
   [INFO] Scanning for projects...
   [INFO] BuildTimeEventSpy is registered.
   [INFO] 
   [INFO] Using the SmartBuilder implementation with a thread count of 15
   [INFO] 
   [INFO] -----------------------------------------------< 
com.mycompany.app:my-app >-----------------------------------------------
   [INFO] Building my-app 1.0-SNAPSHOT
   [INFO]   from pom.xml
   [INFO] ---------------------------------------------------------[ jar 
]----------------------------------------------------------
   [INFO] 
   [INFO] --- spotless:2.44.2:apply (default-cli) @ my-app ---
   [INFO] Index file does not exist. Fallback to an empty index
   [WARNING] [stderr] IS CLEAN
   [INFO] 
--------------------------------------------------------------------------------------------------------------------------
   [INFO] BUILD SUCCESS
   [INFO] 
--------------------------------------------------------------------------------------------------------------------------
   [INFO] Total time:  0.193 s (Wall Clock)
   [INFO] Finished at: 2025-02-14T21:28:56Z
   [INFO] 
--------------------------------------------------------------------------------------------------------------------------
   [ERROR] Error executing Maven Daemon.
   [ERROR] Cannot invoke 
"org.apache.maven.logging.LoggingOutputStream.forceFlush()" because "this.out" 
is null
   ```
   
   I've put together a minimal-ish repro here: 
https://github.com/SapiensAnatis/mvnd-npe-repro. It'll download Spotless as I 
wasn't confident I'd be able to work out exactly what Spotless is doing to 
trigger this and recreate it with a custom goal, so it's not truly minimal, but 
I hope it's a good start.
   
   The file is formatted as expected so it looks to be an error during cleanup. 
If I remove the `-DspotlessIdeHook` flag, I don't get the NPE anymore.
   
   This happens in 1.0.2, and I also built the latest commit from `master` 
where it still reproduces.


-- 
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: issues-unsubscr...@maven.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to