maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brett Porter (JIRA)" <j...@codehaus.org>
Subject [jira] Closed: (MSHADE-9) failure to shade/relocate plexus-archiver (interfaces not properly relocated)
Date Sun, 02 Mar 2008 02:25:28 GMT

     [ http://jira.codehaus.org/browse/MSHADE-9?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Brett Porter closed MSHADE-9.
-----------------------------

         Assignee: Brett Porter
       Resolution: Cannot Reproduce
    Fix Version/s:     (was: 1.0-beta-2)
                   1.0-beta-1

cannot reproduce against 1.0-beta-1

I went back to the old surefire that used archiver and tried this, getting this from javap:
Compiled from "AsiExtraField.java"
public class org.apache.maven.surefire.booter.shade.org.codehaus.plexus.archiver.zip.AsiExtraField
extends java.lang.Object implements org.apache.maven.surefire.booter.shade.org.codehaus.plexus.archiver.zip.ZipExtraField,org.apache.maven.surefire.booter.shade.org.codehaus.plexus.archiver.UnixStat,java.lang.Cloneable{


> failure to shade/relocate plexus-archiver (interfaces not properly relocated)
> -----------------------------------------------------------------------------
>
>                 Key: MSHADE-9
>                 URL: http://jira.codehaus.org/browse/MSHADE-9
>             Project: Maven 2.x Shade Plugin
>          Issue Type: Bug
>    Affects Versions: 1.0-alpha-15
>            Reporter: Dan Fabulich
>            Assignee: Brett Porter
>            Priority: Blocker
>             Fix For: 1.0-beta-1
>
>         Attachments: mshade9-repro.diff
>
>
> I tried using the shade plugin with surefire, to shade/relocate plexus-archiver.  I'm
trying to relocate its package to be org.apache.maven.surefire.shaded.org.codehaus.plexus.archiver.
 It took several tries due to MSHADE-5, but even when it finally "worked", it failed to modify
plexus-archiver correctly.
> org.codehaus.plexus.archiver.zip.AsiExtraField implements org.codehaus.plexus.archiver.zip.ZipExtraField.
 But when I try to run p-archiver after shading it, I get this exception:
> java.lang.ExceptionInInitializerError
>         at org.apache.maven.surefire.shaded.org.codehaus.plexus.archiver.zip.ZipEntry.getCentralDirectoryExtra(ZipEntry.java:386)
>         at org.apache.maven.surefire.shaded.org.codehaus.plexus.archiver.zip.ZipOutputStream.writeCentralFileHeader(ZipOutputStream.java:769)
>         at org.apache.maven.surefire.shaded.org.codehaus.plexus.archiver.zip.ZipOutputStream.finish(ZipOutputStream.java:320)
>         at org.apache.maven.surefire.shaded.org.codehaus.plexus.archiver.zip.ZipOutputStream.close(ZipOutputStream.java:542)
>         at org.apache.maven.surefire.shaded.org.codehaus.plexus.archiver.zip.AbstractZipArchiver.createArchiveMain(AbstractZipArchiver.java:378)
>         at org.apache.maven.surefire.shaded.org.codehaus.plexus.archiver.zip.AbstractZipArchiver.createArchive(AbstractZipArchiver.java:250)
>         at org.apache.maven.surefire.booter.ForkConfiguration.createJar(ForkConfiguration.java:264)
> [snip]
> Caused by: java.lang.RuntimeException: class org.codehaus.plexus.archiver.zip.AsiExtraField
doesn't implement ZipExtraField
>         at org.apache.maven.surefire.shaded.org.codehaus.plexus.archiver.zip.ExtraFieldUtils.register(ExtraFieldUtils.java:63)
>         at org.apache.maven.surefire.shaded.org.codehaus.plexus.archiver.zip.ExtraFieldUtils.<clinit>(ExtraFieldUtils.java:43)
>         ... 31 more
> My decompiler (DJ) shows that the interfaces were partially but not entirely shaded correctly:
> package org.apache.maven.surefire.shaded.org.codehaus.plexus.archiver.zip;
> import java.util.zip.CRC32;
> import java.util.zip.ZipException;
> import org.codehaus.plexus.archiver.UnixStat;
> import org.codehaus.plexus.archiver.zip.ZipExtraField;
> import org.codehaus.plexus.archiver.zip.ZipLong;
> import org.codehaus.plexus.archiver.zip.ZipShort;
> // Referenced classes of package org.apache.maven.surefire.shaded.org.codehaus.plexus.archiver.zip:
> //            ZipExtraField, ZipShort, ZipLong
> public class AsiExtraField
>     implements org.apache.maven.surefire.shaded.org.codehaus.plexus.archiver.zip.ZipExtraField,
org.apache.maven.surefire.shaded.org.codehaus.plexus.archiver.UnixStat, Cloneable
> {
> [...]
> }

-- 
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

        

Mime
View raw message