Maven
  1. Maven
  2. MNG-4793

Unable to obtain archiver for extension 'zip'

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.0-beta-3
    • Fix Version/s: 3.0
    • Component/s: Plugins and Lifecycle
    • Labels:
      None
    • Environment:
      maven-3-beta-2, maven-3-beta-3
    • Complexity:
      Intermediate
    • Number of attachments :
      1

      Description

      There seems to be a regression in maven-3-beta-3 related to the assembly plugin. When building a multi-module project using Maven 3-beta-3 I get the error "Unable to obtain archiver for extension 'zip'". This error does not happen with Maven 3-beta-2.

      I wasn't able to reproduce this problem with a smaller project. The source can be checked out from the jboss repo

      svn co -r 107936 http://anonsvn.jboss.org/repos/jbossas/trunk
      

      The problem can be seen running building certain modules.

      mvn clean install -pl deployment,server,osgi/zip
      

      I will try to narrow down the problem further if I have some time.

        Activity

        Hide
        Stuart McCulloch added a comment -

        Recreated locally, investigating...

        Show
        Stuart McCulloch added a comment - Recreated locally, investigating...
        Hide
        Stuart McCulloch added a comment -

        Fixed in http://github.com/sonatype/sisu/commit/4efc10f500dba7a4acfe91d782eebf71ff1f5d79

        The problem was in container code that sets the TCCL for components with lifecycles (contextualizable, initializable, etc.). The TCCL should be set to whatever realm the component belongs to, in order for string-based lookups to work as expected from lifecycle methods.

        Unfortunately this container code did not take into account the possibility of proxy classes, where the real component class (and the associated realm) is further up the class hierarchy. The fix is to search the hierarchy until we find a class which was loaded by a realm - and if we don't find one then we just leave the TCCL set to the last context realm.

        [Note: the proxy class in this case was one generated by the container for situations where the same component implementation is used multiple times for different hints - we need a way to disambiguate between each use of the implementation when performing custom injection in Guice, and creating thin proxies was the easiest way to achieve this as the custom injection is performed per-type]

        Show
        Stuart McCulloch added a comment - Fixed in http://github.com/sonatype/sisu/commit/4efc10f500dba7a4acfe91d782eebf71ff1f5d79 The problem was in container code that sets the TCCL for components with lifecycles (contextualizable, initializable, etc.). The TCCL should be set to whatever realm the component belongs to, in order for string-based lookups to work as expected from lifecycle methods. Unfortunately this container code did not take into account the possibility of proxy classes, where the real component class (and the associated realm) is further up the class hierarchy. The fix is to search the hierarchy until we find a class which was loaded by a realm - and if we don't find one then we just leave the TCCL set to the last context realm. [Note: the proxy class in this case was one generated by the container for situations where the same component implementation is used multiple times for different hints - we need a way to disambiguate between each use of the implementation when performing custom injection in Guice, and creating thin proxies was the easiest way to achieve this as the custom injection is performed per-type]
        Hide
        Paul Gier added a comment -

        I tested the change locally and it fixes the problem for me, thanks!
        Will this be included in 3.0-beta-4?

        Show
        Paul Gier added a comment - I tested the change locally and it fixes the problem for me, thanks! Will this be included in 3.0-beta-4?
        Hide
        Benjamin Bentmann added a comment -

        Fixed in r997467.

        Show
        Benjamin Bentmann added a comment - Fixed in r997467 .

          People

          • Assignee:
            Benjamin Bentmann
            Reporter:
            Paul Gier
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: