maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benson Margulies (JIRA)" <j...@codehaus.org>
Subject [jira] (MSHADE-75) Package maven multimodule project with shade plugin : error in opening zip on directory
Date Mon, 28 May 2012 00:25:21 GMT

    [ 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

        

Mime
View raw message