Uploaded image for project: 'Maven Site Plugin'
  1. Maven Site Plugin
  2. MSITE-508

attach-descriptor goals leaks file handlers, causing sporadic build failures when gpg tries to sign descriptor during release

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1.1, 3.0-beta-2
    • 2.2, 3.0-beta-3
    • site descriptor
    • 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.

      Attachments

        Activity

          People

            olamy Olivier Lamy
            bentmann Benjamin Bentmann
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: