Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.1.1, 3.0-beta-2
-
None
Description
An excerpt from a debug log:
[INFO] --- maven-site-plugin:3.0-beta-2:attach-descriptor (attach-descriptor) @ mojo-parent --- [INFO] Parent project loaded from repository. [DEBUG] Attaching the site descriptor 'D:\codehaus\mojo\mojo\mojo-parent\target\mojo-parent-27-SNAPSHOT-site.xml' with classifier 'site' to the project. [INFO] [INFO] --- maven-gpg-plugin:1.1:sign (sign-artifacts) @ mojo-parent --- [DEBUG] Generating signature for D:\codehaus\mojo\mojo\mojo-parent\target\mojo-parent-27-SNAPSHOT.pom [DEBUG] Generating signature for D:\codehaus\mojo\mojo\mojo-parent\target\mojo-parent-27-SNAPSHOT-source-release.zip [DEBUG] Generating signature for D:\codehaus\mojo\mojo\mojo-parent\target\mojo-parent-27-SNAPSHOT-site.xml gpg: can't open `D:\codehaus\mojo\mojo\mojo-parent\target\mojo-parent-27-SNAPSHOT-site.xml': No error gpg: signing failed: file open error
The cause for this is that site:attach-descriptor leaks at least two file handles, once in the call IOUtil.toString( ReaderFactory.newXmlReader( descriptorFile ) ); and more importantly in Writer writer = WriterFactory.newXmlWriter( interpolatedDescriptorFile );. Those readers/writers get never closed, and can prevent other mojos from properly accessing those files.