You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Yoann Yonnet (JIRA)" <ji...@codehaus.org> on 2010/02/12 10:46:55 UTC

[jira] Created: (MSHADE-75) Package maven multimodule project with shade plugin : error in opening zip on directory

Package maven multimodule project with shade plugin : error in opening zip on directory
---------------------------------------------------------------------------------------

                 Key: MSHADE-75
                 URL: http://jira.codehaus.org/browse/MSHADE-75
             Project: Maven 2.x Shade Plugin
          Issue Type: Bug
    Affects Versions: 1.3.1
         Environment: Ubuntu 9.04 - Jaunty Jackalope -, Eclispse (Galileo), java 1.6.0_16
            Reporter: Yoann Yonnet
         Attachments: patch-maven-shade-plugin.txt

Hello,

I make a maven aggregator project with two modules.
The first module is a dependency of the second.
The first module is build with the install goal.
The second with the shade plugin during the package phase.
The first module build runs successfully and install resulting jar file in the maven local repository.
The second module build fails with this error : 

[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error creating shaded jar: error in opening zip file /home/yoann/workspace/maven.1265640716107/trunk/tcx-ws-client/module1/target/classes

[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10 seconds
[INFO] Finished at: Fri Feb 12 10:39:29 CET 2010
[INFO] Final Memory: 59M/583M
[INFO] ------------------------------------------------------------------------

It's due to the shade plugin whose tries to reference first module classes from target/classes repository instead of the jar file previously build.
Therefore, it seems that the shade plugin doesn't work with a maven multimodules project.

I manage to build my maven aggregator project by applying the attached patch (patch-maven-shade-plugin.txt) on the class ShadeMojo.java


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MSHADE-75) Package maven multimodule project with shade plugin : error in opening zip on directory

Posted by "Yoann Yonnet (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MSHADE-75?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=210184#action_210184 ] 

Yoann Yonnet commented on MSHADE-75:
------------------------------------

I use Maven 2.1.0 and the m2eclipse plugin installed from the following Eclipse update URL : http://m2eclipse.sonatype.org/update/



> Package maven multimodule project with shade plugin : error in opening zip on directory
> ---------------------------------------------------------------------------------------
>
>                 Key: MSHADE-75
>                 URL: http://jira.codehaus.org/browse/MSHADE-75
>             Project: Maven 2.x Shade Plugin
>          Issue Type: Bug
>    Affects Versions: 1.3.1
>         Environment: Ubuntu 9.04 - Jaunty Jackalope -, Eclispse (Galileo), java 1.6.0_16
>            Reporter: Yoann Yonnet
>         Attachments: patch-maven-shade-plugin.txt
>
>
> Hello,
> I make a maven aggregator project with two modules.
> The first module is a dependency of the second.
> The first module is build with the install goal.
> The second with the shade plugin during the package phase.
> The first module build runs successfully and install resulting jar file in the maven local repository.
> The second module build fails with this error : 
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Error creating shaded jar: error in opening zip file /home/yoann/workspace/maven.1265640716107/trunk/tcx-ws-client/module1/target/classes
> [INFO] ------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 10 seconds
> [INFO] Finished at: Fri Feb 12 10:39:29 CET 2010
> [INFO] Final Memory: 59M/583M
> [INFO] ------------------------------------------------------------------------
> It's due to the shade plugin whose tries to reference first module classes from target/classes repository instead of the jar file previously build.
> Therefore, it seems that the shade plugin doesn't work with a maven multimodules project.
> I manage to build my maven aggregator project by applying the attached patch (patch-maven-shade-plugin.txt) on the class ShadeMojo.java

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MSHADE-75) Package maven multimodule project with shade plugin : error in opening zip on directory

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MSHADE-75?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Olivier Lamy updated MSHADE-75:
-------------------------------

    Labels: moreinfo  (was: )
    
> Package maven multimodule project with shade plugin : error in opening zip on directory
> ---------------------------------------------------------------------------------------
>
>                 Key: MSHADE-75
>                 URL: https://jira.codehaus.org/browse/MSHADE-75
>             Project: Maven 2.x Shade Plugin
>          Issue Type: Bug
>    Affects Versions: 1.3.1
>         Environment: Ubuntu 9.04 - Jaunty Jackalope -, Eclispse (Galileo), java 1.6.0_16
>            Reporter: Yoann Yonnet
>              Labels: moreinfo
>         Attachments: patch-maven-shade-plugin.txt
>
>
> Hello,
> I make a maven aggregator project with two modules.
> The first module is a dependency of the second.
> The first module is build with the install goal.
> The second with the shade plugin during the package phase.
> The first module build runs successfully and install resulting jar file in the maven local repository.
> The second module build fails with this error : 
> {noformat}[INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Error creating shaded jar: error in opening zip file /home/yoann/workspace/maven.1265640716107/trunk/tcx-ws-client/module1/target/classes
> [INFO] ------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 10 seconds
> [INFO] Finished at: Fri Feb 12 10:39:29 CET 2010
> [INFO] Final Memory: 59M/583M
> [INFO] ------------------------------------------------------------------------{noformat}
> It's due to the shade plugin whose tries to reference first module classes from target/classes repository instead of the jar file previously build.
> Therefore, it seems that the shade plugin doesn't work with a maven multimodules project.
> I manage to build my maven aggregator project by applying the attached patch (patch-maven-shade-plugin.txt) on the class ShadeMojo.java

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MSHADE-75) Package maven multimodule project with shade plugin : error in opening zip on directory

Posted by "Stefan Rufer (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MSHADE-75?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=211857#action_211857 ] 

Stefan Rufer commented on MSHADE-75:
------------------------------------

Similar effect for me, but not exactly as described above: It seems that the shade plugin tries to include the target/classes directory of the module for which it was started:

srufer@legolas:~/Documents/ws-titrakk/sixtrakk-client-remoting$ mvn clean package

[INFO] [jar:jar {execution: default-jar}]
[INFO] Building jar: /home/srufer/Documents/ws-titrakk/sixtrakk-client-remoting/target/sixtrakk-client-1.0.1-SNAPSHOT-nctest.jar
...
[INFO] [shade:shade {execution: default}]
...
[INFO] Including commons-codec:commons-codec:jar:1.2 in the shaded jar.
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error creating shaded jar: error in opening zip file /home/srufer/Documents/ws-titrakk/sixtrakk-client-remoting/target/classes

[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8 seconds
[INFO] Finished at: Fri Feb 26 23:59:57 CET 2010
[INFO] Final Memory: 24M/153M
[INFO] ------------------------------------------------------------------------
srufer@legolas:~/Documents/ws-titrakk/sixtrakk-client-remoting$ 

However, if I comment out the classifier tag of the maven-jar-plugin in my pom.xml, it builds the shaded JAR without complaints. Is the shade plugin being confused by this?

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
  <!-- 
          <classifier>${env.name}</classifier>
 -->
        </configuration>
      </plugin>

Maven 2.2.1, Java 1.6.0_16, maven-shade-plugin 1.3.1

> Package maven multimodule project with shade plugin : error in opening zip on directory
> ---------------------------------------------------------------------------------------
>
>                 Key: MSHADE-75
>                 URL: http://jira.codehaus.org/browse/MSHADE-75
>             Project: Maven 2.x Shade Plugin
>          Issue Type: Bug
>    Affects Versions: 1.3.1
>         Environment: Ubuntu 9.04 - Jaunty Jackalope -, Eclispse (Galileo), java 1.6.0_16
>            Reporter: Yoann Yonnet
>         Attachments: patch-maven-shade-plugin.txt
>
>
> Hello,
> I make a maven aggregator project with two modules.
> The first module is a dependency of the second.
> The first module is build with the install goal.
> The second with the shade plugin during the package phase.
> The first module build runs successfully and install resulting jar file in the maven local repository.
> The second module build fails with this error : 
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Error creating shaded jar: error in opening zip file /home/yoann/workspace/maven.1265640716107/trunk/tcx-ws-client/module1/target/classes
> [INFO] ------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 10 seconds
> [INFO] Finished at: Fri Feb 12 10:39:29 CET 2010
> [INFO] Final Memory: 59M/583M
> [INFO] ------------------------------------------------------------------------
> It's due to the shade plugin whose tries to reference first module classes from target/classes repository instead of the jar file previously build.
> Therefore, it seems that the shade plugin doesn't work with a maven multimodules project.
> I manage to build my maven aggregator project by applying the attached patch (patch-maven-shade-plugin.txt) on the class ShadeMojo.java

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (MSHADE-75) Package maven multimodule project with shade plugin : error in opening zip on directory

Posted by "Herve Boutemy (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MSHADE-75?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Herve Boutemy updated MSHADE-75:
--------------------------------

    Description: 
Hello,

I make a maven aggregator project with two modules.
The first module is a dependency of the second.
The first module is build with the install goal.
The second with the shade plugin during the package phase.
The first module build runs successfully and install resulting jar file in the maven local repository.
The second module build fails with this error : 

{noformat}[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error creating shaded jar: error in opening zip file /home/yoann/workspace/maven.1265640716107/trunk/tcx-ws-client/module1/target/classes

[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10 seconds
[INFO] Finished at: Fri Feb 12 10:39:29 CET 2010
[INFO] Final Memory: 59M/583M
[INFO] ------------------------------------------------------------------------{noformat}

It's due to the shade plugin whose tries to reference first module classes from target/classes repository instead of the jar file previously build.
Therefore, it seems that the shade plugin doesn't work with a maven multimodules project.

I manage to build my maven aggregator project by applying the attached patch (patch-maven-shade-plugin.txt) on the class ShadeMojo.java


  was:
Hello,

I make a maven aggregator project with two modules.
The first module is a dependency of the second.
The first module is build with the install goal.
The second with the shade plugin during the package phase.
The first module build runs successfully and install resulting jar file in the maven local repository.
The second module build fails with this error : 

[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error creating shaded jar: error in opening zip file /home/yoann/workspace/maven.1265640716107/trunk/tcx-ws-client/module1/target/classes

[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10 seconds
[INFO] Finished at: Fri Feb 12 10:39:29 CET 2010
[INFO] Final Memory: 59M/583M
[INFO] ------------------------------------------------------------------------

It's due to the shade plugin whose tries to reference first module classes from target/classes repository instead of the jar file previously build.
Therefore, it seems that the shade plugin doesn't work with a maven multimodules project.

I manage to build my maven aggregator project by applying the attached patch (patch-maven-shade-plugin.txt) on the class ShadeMojo.java



> Package maven multimodule project with shade plugin : error in opening zip on directory
> ---------------------------------------------------------------------------------------
>
>                 Key: MSHADE-75
>                 URL: https://jira.codehaus.org/browse/MSHADE-75
>             Project: Maven 2.x Shade Plugin
>          Issue Type: Bug
>    Affects Versions: 1.3.1
>         Environment: Ubuntu 9.04 - Jaunty Jackalope -, Eclispse (Galileo), java 1.6.0_16
>            Reporter: Yoann Yonnet
>         Attachments: patch-maven-shade-plugin.txt
>
>
> Hello,
> I make a maven aggregator project with two modules.
> The first module is a dependency of the second.
> The first module is build with the install goal.
> The second with the shade plugin during the package phase.
> The first module build runs successfully and install resulting jar file in the maven local repository.
> The second module build fails with this error : 
> {noformat}[INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Error creating shaded jar: error in opening zip file /home/yoann/workspace/maven.1265640716107/trunk/tcx-ws-client/module1/target/classes
> [INFO] ------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 10 seconds
> [INFO] Finished at: Fri Feb 12 10:39:29 CET 2010
> [INFO] Final Memory: 59M/583M
> [INFO] ------------------------------------------------------------------------{noformat}
> It's due to the shade plugin whose tries to reference first module classes from target/classes repository instead of the jar file previously build.
> Therefore, it seems that the shade plugin doesn't work with a maven multimodules project.
> I manage to build my maven aggregator project by applying the attached patch (patch-maven-shade-plugin.txt) on the class ShadeMojo.java

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MSHADE-75) Package maven multimodule project with shade plugin : error in opening zip on directory

Posted by "Stephanos Piperoglou (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MSHADE-75?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stephanos Piperoglou updated MSHADE-75:
---------------------------------------

    Attachment: pom.xml

Here's a dirt simple test case, just a simple pom. Running this with Maven 2.2.1 gives me:


[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error creating shaded jar: C:\dev\workspaces\indigo\mshade-75\target\classes (Access is denied)

                
> Package maven multimodule project with shade plugin : error in opening zip on directory
> ---------------------------------------------------------------------------------------
>
>                 Key: MSHADE-75
>                 URL: https://jira.codehaus.org/browse/MSHADE-75
>             Project: Maven 2.x Shade Plugin
>          Issue Type: Bug
>    Affects Versions: 1.3.1
>         Environment: Ubuntu 9.04 - Jaunty Jackalope -, Eclispse (Galileo), java 1.6.0_16
>            Reporter: Yoann Yonnet
>              Labels: moreinfo
>         Attachments: patch-maven-shade-plugin.txt, pom.xml
>
>
> Hello,
> I make a maven aggregator project with two modules.
> The first module is a dependency of the second.
> The first module is build with the install goal.
> The second with the shade plugin during the package phase.
> The first module build runs successfully and install resulting jar file in the maven local repository.
> The second module build fails with this error : 
> {noformat}[INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Error creating shaded jar: error in opening zip file /home/yoann/workspace/maven.1265640716107/trunk/tcx-ws-client/module1/target/classes
> [INFO] ------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 10 seconds
> [INFO] Finished at: Fri Feb 12 10:39:29 CET 2010
> [INFO] Final Memory: 59M/583M
> [INFO] ------------------------------------------------------------------------{noformat}
> It's due to the shade plugin whose tries to reference first module classes from target/classes repository instead of the jar file previously build.
> Therefore, it seems that the shade plugin doesn't work with a maven multimodules project.
> I manage to build my maven aggregator project by applying the attached patch (patch-maven-shade-plugin.txt) on the class ShadeMojo.java

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MSHADE-75) Package maven multimodule project with shade plugin : error in opening zip on directory

Posted by "Benson Margulies (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MSHADE-75?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benson Margulies closed MSHADE-75.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 1.7
         Assignee: Benson Margulies

Proper diagnosis added.

                
> Package maven multimodule project with shade plugin : error in opening zip on directory
> ---------------------------------------------------------------------------------------
>
>                 Key: MSHADE-75
>                 URL: https://jira.codehaus.org/browse/MSHADE-75
>             Project: Maven 2.x Shade Plugin
>          Issue Type: Bug
>    Affects Versions: 1.3.1
>         Environment: Ubuntu 9.04 - Jaunty Jackalope -, Eclispse (Galileo), java 1.6.0_16
>            Reporter: Yoann Yonnet
>            Assignee: Benson Margulies
>              Labels: moreinfo
>             Fix For: 1.7
>
>         Attachments: patch-maven-shade-plugin.txt, pom.xml
>
>
> Hello,
> I make a maven aggregator project with two modules.
> The first module is a dependency of the second.
> The first module is build with the install goal.
> The second with the shade plugin during the package phase.
> The first module build runs successfully and install resulting jar file in the maven local repository.
> The second module build fails with this error : 
> {noformat}[INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Error creating shaded jar: error in opening zip file /home/yoann/workspace/maven.1265640716107/trunk/tcx-ws-client/module1/target/classes
> [INFO] ------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 10 seconds
> [INFO] Finished at: Fri Feb 12 10:39:29 CET 2010
> [INFO] Final Memory: 59M/583M
> [INFO] ------------------------------------------------------------------------{noformat}
> It's due to the shade plugin whose tries to reference first module classes from target/classes repository instead of the jar file previously build.
> Therefore, it seems that the shade plugin doesn't work with a maven multimodules project.
> I manage to build my maven aggregator project by applying the attached patch (patch-maven-shade-plugin.txt) on the class ShadeMojo.java

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MSHADE-75) Package maven multimodule project with shade plugin : error in opening zip on directory

Posted by "Benson Margulies (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MSHADE-75?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=299842#comment-299842 ] 

Benson Margulies commented on MSHADE-75:
----------------------------------------

This is not a test case for the problem at hand. The pom supplied creates a classified jar but does not include it in shade. Instead, it fails, as far as I can tell, because there are no resources to include in the shaded jar at all. I'm looking further.
                
> Package maven multimodule project with shade plugin : error in opening zip on directory
> ---------------------------------------------------------------------------------------
>
>                 Key: MSHADE-75
>                 URL: https://jira.codehaus.org/browse/MSHADE-75
>             Project: Maven 2.x Shade Plugin
>          Issue Type: Bug
>    Affects Versions: 1.3.1
>         Environment: Ubuntu 9.04 - Jaunty Jackalope -, Eclispse (Galileo), java 1.6.0_16
>            Reporter: Yoann Yonnet
>              Labels: moreinfo
>         Attachments: patch-maven-shade-plugin.txt, pom.xml
>
>
> Hello,
> I make a maven aggregator project with two modules.
> The first module is a dependency of the second.
> The first module is build with the install goal.
> The second with the shade plugin during the package phase.
> The first module build runs successfully and install resulting jar file in the maven local repository.
> The second module build fails with this error : 
> {noformat}[INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Error creating shaded jar: error in opening zip file /home/yoann/workspace/maven.1265640716107/trunk/tcx-ws-client/module1/target/classes
> [INFO] ------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 10 seconds
> [INFO] Finished at: Fri Feb 12 10:39:29 CET 2010
> [INFO] Final Memory: 59M/583M
> [INFO] ------------------------------------------------------------------------{noformat}
> It's due to the shade plugin whose tries to reference first module classes from target/classes repository instead of the jar file previously build.
> Therefore, it seems that the shade plugin doesn't work with a maven multimodules project.
> I manage to build my maven aggregator project by applying the attached patch (patch-maven-shade-plugin.txt) on the class ShadeMojo.java

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MSHADE-75) Package maven multimodule project with shade plugin : error in opening zip on directory

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MSHADE-75?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=293975#comment-293975 ] 

Olivier Lamy commented on MSHADE-75:
------------------------------------

I have added an it test and cannot reproduce. Could you please provide a sample project which reproduce your issue ? Thanks
                
> Package maven multimodule project with shade plugin : error in opening zip on directory
> ---------------------------------------------------------------------------------------
>
>                 Key: MSHADE-75
>                 URL: https://jira.codehaus.org/browse/MSHADE-75
>             Project: Maven 2.x Shade Plugin
>          Issue Type: Bug
>    Affects Versions: 1.3.1
>         Environment: Ubuntu 9.04 - Jaunty Jackalope -, Eclispse (Galileo), java 1.6.0_16
>            Reporter: Yoann Yonnet
>              Labels: moreinfo
>         Attachments: patch-maven-shade-plugin.txt
>
>
> Hello,
> I make a maven aggregator project with two modules.
> The first module is a dependency of the second.
> The first module is build with the install goal.
> The second with the shade plugin during the package phase.
> The first module build runs successfully and install resulting jar file in the maven local repository.
> The second module build fails with this error : 
> {noformat}[INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Error creating shaded jar: error in opening zip file /home/yoann/workspace/maven.1265640716107/trunk/tcx-ws-client/module1/target/classes
> [INFO] ------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 10 seconds
> [INFO] Finished at: Fri Feb 12 10:39:29 CET 2010
> [INFO] Final Memory: 59M/583M
> [INFO] ------------------------------------------------------------------------{noformat}
> It's due to the shade plugin whose tries to reference first module classes from target/classes repository instead of the jar file previously build.
> Therefore, it seems that the shade plugin doesn't work with a maven multimodules project.
> I manage to build my maven aggregator project by applying the attached patch (patch-maven-shade-plugin.txt) on the class ShadeMojo.java

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MSHADE-75) Package maven multimodule project with shade plugin : error in opening zip on directory

Posted by "Benson Margulies (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MSHADE-75?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=299843#comment-299843 ] 

Benson Margulies commented on MSHADE-75:
----------------------------------------

I claim that this case should not work, but it could 'not work' more politely.

What you've done is disrupt the production of the project's main artifact. By adding a classifier to the default execution of the jar plugin, you've made the jar plugin create an attached artifact *instead of* the main 'jar' artifact. This leaves the project 'naked' and no longer producing a jar, and so shade is flummoxed. Arguably, this case should produce a diagnostic like the diagnostic for non-jar projects, and that's what I'm going to make it do. Then, I believe that you could exclude the project's main artifact from shade and ask for the classified one instead.

                
> Package maven multimodule project with shade plugin : error in opening zip on directory
> ---------------------------------------------------------------------------------------
>
>                 Key: MSHADE-75
>                 URL: https://jira.codehaus.org/browse/MSHADE-75
>             Project: Maven 2.x Shade Plugin
>          Issue Type: Bug
>    Affects Versions: 1.3.1
>         Environment: Ubuntu 9.04 - Jaunty Jackalope -, Eclispse (Galileo), java 1.6.0_16
>            Reporter: Yoann Yonnet
>              Labels: moreinfo
>         Attachments: patch-maven-shade-plugin.txt, pom.xml
>
>
> Hello,
> I make a maven aggregator project with two modules.
> The first module is a dependency of the second.
> The first module is build with the install goal.
> The second with the shade plugin during the package phase.
> The first module build runs successfully and install resulting jar file in the maven local repository.
> The second module build fails with this error : 
> {noformat}[INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Error creating shaded jar: error in opening zip file /home/yoann/workspace/maven.1265640716107/trunk/tcx-ws-client/module1/target/classes
> [INFO] ------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 10 seconds
> [INFO] Finished at: Fri Feb 12 10:39:29 CET 2010
> [INFO] Final Memory: 59M/583M
> [INFO] ------------------------------------------------------------------------{noformat}
> It's due to the shade plugin whose tries to reference first module classes from target/classes repository instead of the jar file previously build.
> Therefore, it seems that the shade plugin doesn't work with a maven multimodules project.
> I manage to build my maven aggregator project by applying the attached patch (patch-maven-shade-plugin.txt) on the class ShadeMojo.java

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MSHADE-75) Package maven multimodule project with shade plugin : error in opening zip on directory

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MSHADE-75?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=210064#action_210064 ] 

Benjamin Bentmann commented on MSHADE-75:
-----------------------------------------

What Maven version was used for the build?

> Package maven multimodule project with shade plugin : error in opening zip on directory
> ---------------------------------------------------------------------------------------
>
>                 Key: MSHADE-75
>                 URL: http://jira.codehaus.org/browse/MSHADE-75
>             Project: Maven 2.x Shade Plugin
>          Issue Type: Bug
>    Affects Versions: 1.3.1
>         Environment: Ubuntu 9.04 - Jaunty Jackalope -, Eclispse (Galileo), java 1.6.0_16
>            Reporter: Yoann Yonnet
>         Attachments: patch-maven-shade-plugin.txt
>
>
> Hello,
> I make a maven aggregator project with two modules.
> The first module is a dependency of the second.
> The first module is build with the install goal.
> The second with the shade plugin during the package phase.
> The first module build runs successfully and install resulting jar file in the maven local repository.
> The second module build fails with this error : 
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Error creating shaded jar: error in opening zip file /home/yoann/workspace/maven.1265640716107/trunk/tcx-ws-client/module1/target/classes
> [INFO] ------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 10 seconds
> [INFO] Finished at: Fri Feb 12 10:39:29 CET 2010
> [INFO] Final Memory: 59M/583M
> [INFO] ------------------------------------------------------------------------
> It's due to the shade plugin whose tries to reference first module classes from target/classes repository instead of the jar file previously build.
> Therefore, it seems that the shade plugin doesn't work with a maven multimodules project.
> I manage to build my maven aggregator project by applying the attached patch (patch-maven-shade-plugin.txt) on the class ShadeMojo.java

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MSHADE-75) Package maven multimodule project with shade plugin : error in opening zip on directory

Posted by "Benson Margulies (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MSHADE-75?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=299847#comment-299847 ] 

Benson Margulies commented on MSHADE-75:
----------------------------------------

r1343119 | bimargulies | 2012-05-27 20:52:20 -0400 (Sun, 27 May 2012) | 3 lines

MSHADE-75: Package maven multimodule project with shade plugin : error in opening zip on directory
o detect and diagnose missing jar main artifact.

------------------------------------------------------------------------

------------------------------------------------------------------------
r1343121 | bimargulies | 2012-05-27 21:01:53 -0400 (Sun, 27 May 2012) | 3 lines

MSHADE-75: Package maven multimodule project with shade plugin : error in opening zip on directory
 o this was a dumb error in the work on -75 that I misattributed briefly.

------------------------------------------------------------------------


                
> Package maven multimodule project with shade plugin : error in opening zip on directory
> ---------------------------------------------------------------------------------------
>
>                 Key: MSHADE-75
>                 URL: https://jira.codehaus.org/browse/MSHADE-75
>             Project: Maven 2.x Shade Plugin
>          Issue Type: Bug
>    Affects Versions: 1.3.1
>         Environment: Ubuntu 9.04 - Jaunty Jackalope -, Eclispse (Galileo), java 1.6.0_16
>            Reporter: Yoann Yonnet
>            Assignee: Benson Margulies
>              Labels: moreinfo
>             Fix For: 1.7
>
>         Attachments: patch-maven-shade-plugin.txt, pom.xml
>
>
> Hello,
> I make a maven aggregator project with two modules.
> The first module is a dependency of the second.
> The first module is build with the install goal.
> The second with the shade plugin during the package phase.
> The first module build runs successfully and install resulting jar file in the maven local repository.
> The second module build fails with this error : 
> {noformat}[INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Error creating shaded jar: error in opening zip file /home/yoann/workspace/maven.1265640716107/trunk/tcx-ws-client/module1/target/classes
> [INFO] ------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 10 seconds
> [INFO] Finished at: Fri Feb 12 10:39:29 CET 2010
> [INFO] Final Memory: 59M/583M
> [INFO] ------------------------------------------------------------------------{noformat}
> It's due to the shade plugin whose tries to reference first module classes from target/classes repository instead of the jar file previously build.
> Therefore, it seems that the shade plugin doesn't work with a maven multimodules project.
> I manage to build my maven aggregator project by applying the attached patch (patch-maven-shade-plugin.txt) on the class ShadeMojo.java

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MSHADE-75) Package maven multimodule project with shade plugin : error in opening zip on directory

Posted by "Benson Margulies (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MSHADE-75?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=299842#comment-299842 ] 

Benson Margulies edited comment on MSHADE-75 at 5/27/12 7:24 PM:
-----------------------------------------------------------------

This is not a fix for the problem at hand. The patch doesn't change the behavior at all, it would apply to a case where a declared dependency had a classifier, and the fix would never work, either.
                
      was (Author: bmargulies):
    This is not a test case for the problem at hand. The pom supplied creates a classified jar but does not include it in shade. Instead, it fails, as far as I can tell, because there are no resources to include in the shaded jar at all. I'm looking further.
                  
> Package maven multimodule project with shade plugin : error in opening zip on directory
> ---------------------------------------------------------------------------------------
>
>                 Key: MSHADE-75
>                 URL: https://jira.codehaus.org/browse/MSHADE-75
>             Project: Maven 2.x Shade Plugin
>          Issue Type: Bug
>    Affects Versions: 1.3.1
>         Environment: Ubuntu 9.04 - Jaunty Jackalope -, Eclispse (Galileo), java 1.6.0_16
>            Reporter: Yoann Yonnet
>              Labels: moreinfo
>         Attachments: patch-maven-shade-plugin.txt, pom.xml
>
>
> Hello,
> I make a maven aggregator project with two modules.
> The first module is a dependency of the second.
> The first module is build with the install goal.
> The second with the shade plugin during the package phase.
> The first module build runs successfully and install resulting jar file in the maven local repository.
> The second module build fails with this error : 
> {noformat}[INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Error creating shaded jar: error in opening zip file /home/yoann/workspace/maven.1265640716107/trunk/tcx-ws-client/module1/target/classes
> [INFO] ------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 10 seconds
> [INFO] Finished at: Fri Feb 12 10:39:29 CET 2010
> [INFO] Final Memory: 59M/583M
> [INFO] ------------------------------------------------------------------------{noformat}
> It's due to the shade plugin whose tries to reference first module classes from target/classes repository instead of the jar file previously build.
> Therefore, it seems that the shade plugin doesn't work with a maven multimodules project.
> I manage to build my maven aggregator project by applying the attached patch (patch-maven-shade-plugin.txt) on the class ShadeMojo.java

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MSHADE-75) Package maven multimodule project with shade plugin : error in opening zip on directory

Posted by "Stephanos Piperoglou (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MSHADE-75?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=295681#comment-295681 ] 

Stephanos Piperoglou commented on MSHADE-75:
--------------------------------------------

Specifically, the error arises when the maevn-jar-plugin has a classifier in its configuration.
                
> Package maven multimodule project with shade plugin : error in opening zip on directory
> ---------------------------------------------------------------------------------------
>
>                 Key: MSHADE-75
>                 URL: https://jira.codehaus.org/browse/MSHADE-75
>             Project: Maven 2.x Shade Plugin
>          Issue Type: Bug
>    Affects Versions: 1.3.1
>         Environment: Ubuntu 9.04 - Jaunty Jackalope -, Eclispse (Galileo), java 1.6.0_16
>            Reporter: Yoann Yonnet
>              Labels: moreinfo
>         Attachments: patch-maven-shade-plugin.txt, pom.xml
>
>
> Hello,
> I make a maven aggregator project with two modules.
> The first module is a dependency of the second.
> The first module is build with the install goal.
> The second with the shade plugin during the package phase.
> The first module build runs successfully and install resulting jar file in the maven local repository.
> The second module build fails with this error : 
> {noformat}[INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Error creating shaded jar: error in opening zip file /home/yoann/workspace/maven.1265640716107/trunk/tcx-ws-client/module1/target/classes
> [INFO] ------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 10 seconds
> [INFO] Finished at: Fri Feb 12 10:39:29 CET 2010
> [INFO] Final Memory: 59M/583M
> [INFO] ------------------------------------------------------------------------{noformat}
> It's due to the shade plugin whose tries to reference first module classes from target/classes repository instead of the jar file previously build.
> Therefore, it seems that the shade plugin doesn't work with a maven multimodules project.
> I manage to build my maven aggregator project by applying the attached patch (patch-maven-shade-plugin.txt) on the class ShadeMojo.java

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira