slachiewicz opened a new pull request, #14091:
URL: https://github.com/apache/maven/pull/14091

   Backport of #13737 to `maven-3.9.x`, part of #13738.
   
   `CoreExtensionEntry.discoverFrom` and `PluginDescriptor.getLifecycleMapping` 
read resources from extension and plugin jars with `URL.openStream()`, which 
leaves each jar open in the JVM-wide `jar:` cache 
([JDK-8239054](https://bugs.openjdk.org/browse/JDK-8239054)). Under mvnd, a 
plugin with a forked `lifecycle.xml` that is rebuilt in the reactor is read 
stale or, on Windows, cannot be overwritten. The connections are now uncached, 
so closing the stream closes the jar.
   
   Verified: `PluginDescriptorTest.lifecycleMappingReadsRewrittenJar` fails on 
`maven-3.9.x` with `EOFException: Unexpected end of ZLIB input stream` and 
passes here.
   
   Cherry-pick of `db57c679ef` with no conflicts.
   


-- 
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]

Reply via email to