[ 
https://jira.codehaus.org/browse/MASSEMBLY-742?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=365592#comment-365592
 ] 

Dawid Weiss commented on MASSEMBLY-742:
---------------------------------------

> I have tested your project. As long as plexus-io 2.5 is used together with 
> the latest snapshot of archiver, it should work properly. 

I've fetched the most recent code from here:
{code}
git clone g...@github.com:codehaus-plexus/plexus-archiver.git
git checkout 2.x
{code}

But this fails to compile (snapshot dependency). When I change the dependency 
to:
{code}
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-compress</artifactId>
      <version>1.10</version>
    </dependency>
{code}
Tests don't pass.
{code}
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.003 sec

Results :

Failed tests:   testSymlinkDirArchiver(org.codehaus.plexus.archiver.SymlinkTest)
  testSymlinkFileSet(org.codehaus.plexus.archiver.zip.ZipArchiverTest)
  testOverddidenPermissions(org.codehaus.plexus.archiver.zip.ZipArchiverTest)
  testSymlinkZip(org.codehaus.plexus.archiver.zip.ZipArchiverTest)

Tests in error:
  
testCreateResourceCollection(org.codehaus.plexus.archiver.zip.ZipArchiverTest): 
Problem creating zip: Execution exception (and t
he archive is probably corrupt but I could not delete it)

Tests run: 119, Failures: 4, Errors: 1, Skipped: 1
{code}

I'm at this commit:
{code}
commit e6634b216c898d1bfe325b43183eb8fcdc51cf36
Author: Kristian Rosenvold <krosenv...@apache.org>
Date:   Fri Mar 13 07:05:20 2015 +0100

    Back to snapshot
{code}



> Unclosed ZipFile warnings when ZIP archives are included
> --------------------------------------------------------
>
>                 Key: MASSEMBLY-742
>                 URL: https://jira.codehaus.org/browse/MASSEMBLY-742
>             Project: Maven Assembly Plugin
>          Issue Type: Bug
>          Components: dependencySet
>    Affects Versions: 2.5.2
>            Reporter: Dawid Weiss
>            Assignee: Kristian Rosenvold
>            Priority: Minor
>             Fix For: 2.5.3, 2.5.4
>
>         Attachments: example.zip, MASSEMBLY-742.patch
>
>
> I get the following warnings at the end of Maven build:
> {code}
> Cleaning up unclosed ZipFile for archive C:\...foo-0.2.0-SNAPSHOT.zip
> {code}
> These warnings originate from assembly plugin, but in fact they're caused by 
> the fact that plexus resource abstraction opens up a ZipFile from 
> commons-compress, but never closes it. Commons-compress then force-closes all 
> such objects in finalize, emitting a warning.
> I created a synthetic capture of the allocation stack in maven assembly, it's 
> here:
> {code}
> org.apache.commons.compress.archivers.zip.ZipFile.<init>(ZipFile.java:211)
> org.apache.commons.compress.archivers.zip.ZipFile.<init>(ZipFile.java:193)
> org.apache.commons.compress.archivers.zip.ZipFile.<init>(ZipFile.java:154)
> org.codehaus.plexus.archiver.zip.PlexusIoZipFileResourceCollection.getEntries(PlexusIoZipFileResourceCollection.java:29)
> org.codehaus.plexus.components.io.resources.AbstractPlexusIoArchiveResourceCollection.getResources(AbstractPlexusIoArchiveResourceCollection.java:69)
> org.codehaus.plexus.components.io.resources.proxy.PlexusIoProxyResourceCollection.getResources(PlexusIoProxyResourceCollection.java:111)
> org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:493)
> org.codehaus.plexus.archiver.dir.DirectoryArchiver.execute(DirectoryArchiver.java:71)
> org.codehaus.plexus.archiver.AbstractArchiver.createArchive(AbstractArchiver.java:940)
> org.apache.maven.plugin.assembly.archive.archiver.AssemblyProxyArchiver.createArchive(AssemblyProxyArchiver.java:541)
> org.apache.maven.plugin.assembly.archive.DefaultAssemblyArchiver.createArchive(DefaultAssemblyArchiver.java:180)
> org.apache.maven.plugin.assembly.mojos.AbstractAssemblyMojo.execute(AbstractAssemblyMojo.java:486)
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
> org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
> org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
> org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
> org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
> org.apache.maven.cli.MavenCli.execute(MavenCli.java:582)
> org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
> org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> java.lang.reflect.Method.invoke(Method.java:483)
> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
> {code}
> Hope this helps, somehow.



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)

Reply via email to