Uploaded image for project: 'Maven Assembly Plugin'
  1. Maven Assembly Plugin
  2. MASSEMBLY-858

don't read assembly descriptor from thread classloader but plugin classloader

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.0
    • Fix Version/s: 3.1.0
    • Component/s: None
    • Labels:
      None

      Description

      before MASSEMBLY-331 (in 2.2-beta-3), assembly descriptor was read from plugin classloader: it switched inadvertently (apparently) to thread classloader.
      In MNG-6209 for Maven 3.5.1, thread classloader evolves when plugin is flagged as extension and the assembly descriptor won't be available any more
      using thread classloader was not really a good idea, even if it didn't hurt for years: but now, it hurts: a lot of MASSEMBLY ITs related to classpath resources fail with Maven 3.5.1-SNAPSHOT:

      [INFO] --- maven-invoker-plugin:3.0.0:verify (integration-test) @ maven-assembly-plugin ---
      [INFO] -------------------------------------------------
      [INFO] Build Summary:
      [INFO]   Passed: 119, Failed: 14, Errors: 0, Skipped: 2
      [INFO] -------------------------------------------------
      [ERROR] The following builds failed:
      [ERROR] *  projects\bugs\massembly-306\pom.xml
      [ERROR] *  projects\descriptor-refs\bin\jars-in-archive-root\pom.xml
      [ERROR] *  projects\descriptor-refs\jar-with-dependencies\component-descriptors-merged\pom.xml
      [ERROR] *  projects\descriptor-refs\jar-with-dependencies\deps-unpacked-to-root-dir\pom.xml
      [ERROR] *  projects\descriptor-refs\jar-with-dependencies\no-target-dir\pom.xml
      [ERROR] *  projects\descriptor-refs\project\multimodule-sources-copied\pom.xml
      [ERROR] *  projects\descriptor-refs\project\no-target-dir-multimodule\pom.xml
      [ERROR] *  projects\descriptor-refs\project\no-target-dir\pom.xml
      [ERROR] *  projects\descriptor-refs\project\sources-copied\pom.xml
      [ERROR] *  projects\descriptor-refs\src\no-target-dir\pom.xml
      [ERROR] *  projects\descriptor-refs\src\src-dir-copied\pom.xml
      [ERROR] *  projects\mojo-configuration\manifest-with-customEntry\pom.xml
      [ERROR] *  projects\mojo-configuration\manifest-with-mainClass\pom.xml
      [ERROR] *  projects\mojo-configuration\no-appendAssemblyId-no-classifier\pom.xml
      [INFO] -------------------------------------------------
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 12:05 min
      [INFO] Finished at: 2017-06-05T13:14:21+02:00
      [INFO] Final Memory: 88M/1005M
      [INFO] ------------------------------------------------------------------------

      it's time to go back to normal classloader use
      (and it's time also to not flag the plugin as extension in ITs, since it's not the usual configuration for users)

        Issue Links

          Activity

          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Jenkins build maven-plugins #8993 (See https://builds.apache.org/job/maven-plugins/8993/)
          MASSEMBLY-858 don't declare m-assembly-p as extension: this is not normal use, is not useful (and caused failure when MNG-6209 was fixed)
          this shows that MNG-6209 won't break every build with previous m-assembl-p versions: only builds that declare this plugin as extension, but who does that? (hboutemy: http://svn.apache.org/viewvc/?view=rev&rev=1798339)

          • (edit) maven-assembly-plugin/src/it/it-project-parent/pom.xml
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build maven-plugins #8993 (See https://builds.apache.org/job/maven-plugins/8993/ ) MASSEMBLY-858 don't declare m-assembly-p as extension: this is not normal use, is not useful (and caused failure when MNG-6209 was fixed) this shows that MNG-6209 won't break every build with previous m-assembl-p versions: only builds that declare this plugin as extension, but who does that? (hboutemy: http://svn.apache.org/viewvc/?view=rev&rev=1798339 ) (edit) maven-assembly-plugin/src/it/it-project-parent/pom.xml
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Jenkins build maven-plugins #8992 (See https://builds.apache.org/job/maven-plugins/8992/)
          MASSEMBLY-858 use plugin classloader instead of thread classloader
          fixes issues caused by MNG-6209 fix: but currently, every m-assembly-p from 2.2 to 3.0.0 using descriptor from classloader will fail with Maven 3.5.1... (hboutemy: http://svn.apache.org/viewvc/?view=rev&rev=1798337)

          • (edit) maven-assembly-plugin/src/main/java/org/apache/maven/plugins/assembly/io/DefaultAssemblyReader.java
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build maven-plugins #8992 (See https://builds.apache.org/job/maven-plugins/8992/ ) MASSEMBLY-858 use plugin classloader instead of thread classloader fixes issues caused by MNG-6209 fix: but currently, every m-assembly-p from 2.2 to 3.0.0 using descriptor from classloader will fail with Maven 3.5.1... (hboutemy: http://svn.apache.org/viewvc/?view=rev&rev=1798337 ) (edit) maven-assembly-plugin/src/main/java/org/apache/maven/plugins/assembly/io/DefaultAssemblyReader.java

            People

            • Assignee:
              hboutemy Hervé Boutemy
              Reporter:
              hboutemy Hervé Boutemy
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development