Mahout:“创建程序集归档作业时出错”

时间:2013-04-15 16:33:24

标签: java maven mahout

我正在尝试在Ubuntu 12.10服务器上安装Mahout,但我遇到了构建错误,我无法弄清楚它在哪里失败。

如果我在没有-e标志的情况下运行它,则会显示错误消息:

Failed to create assembly: Error creating assembly archive job: error in opening zip file

重现此错误的步骤如下:

  1. svn co http://svn.apache.org/repos/asf/mahout/trunk
  2. 结帐回购
  3. cd trunk /
  4. mvn install -e
  5. mvn -version输出:

    Apache Maven 2.2.1 (rdebian-8)
    Java version: 1.7.0_17
    Java home: /usr/lib/jvm/java-7-oracle/jre
    

    mvn install -e output:

    Tests run: 689, Failures: 0, Errors: 0, Skipped: 0
    
    [INFO] [jar:jar {execution: default-jar}]
    [INFO] Building jar: /root/trunk/core/target/mahout-core-0.8-SNAPSHOT.jar
    [INFO] [jar:test-jar {execution: default}]
    [INFO] Building jar: /root/trunk/core/target/mahout-core-0.8-SNAPSHOT-tests.jar
    [INFO] [assembly:single {execution: job}]
    [INFO] Reading assembly descriptor: src/main/assembly/job.xml
    [WARNING] POM for 'asm:asm:pom:3.1:compile' is invalid.
    
    Its dependencies (if any) will NOT be available to the current build.
    [INFO] ------------------------------------------------------------------------
    [ERROR] BUILD ERROR
    [INFO] ------------------------------------------------------------------------
    [INFO] Failed to create assembly: Error creating assembly archive job: error in opening zip file
    
    [INFO] ------------------------------------------------------------------------
    [INFO] Trace
    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to create assembly: Error creating assembly archive job: error in opening zip file
            at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
            at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
            at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
            at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
            at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
            at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
            at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
            at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
            at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
            at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:601)
            at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
            at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
            at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
            at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
    Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to create assembly: Error creating assembly archive job: error in opening zip file
            at org.apache.maven.plugin.assembly.mojos.AbstractAssemblyMojo.execute(AbstractAssemblyMojo.java:495)
            at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
            at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
            ... 17 more
    Caused by: org.apache.maven.plugin.assembly.archive.ArchiveCreationException: Error creating assembly archive job: error in opening zip file
            at org.apache.maven.plugin.assembly.archive.DefaultAssemblyArchiver.createArchive(DefaultAssemblyArchiver.java:190)
            at org.apache.maven.plugin.assembly.mojos.AbstractAssemblyMojo.execute(AbstractAssemblyMojo.java:436)
            ... 19 more
    Caused by: org.codehaus.plexus.archiver.ArchiverException: error in opening zip file
            at org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:472)
            at org.apache.maven.plugin.assembly.filter.ComponentsXmlArchiverFileFilter.finalizeArchiveCreation(ComponentsXmlArchiverFileFilter.java:166)
            at org.codehaus.plexus.archiver.AbstractArchiver.runArchiveFinalizers(AbstractArchiver.java:884)
            at org.codehaus.plexus.archiver.AbstractArchiver.createArchive(AbstractArchiver.java:908)
            at org.apache.maven.plugin.assembly.archive.archiver.AssemblyProxyArchiver.createArchive(AssemblyProxyArchiver.java:512)
            at org.apache.maven.plugin.assembly.archive.DefaultAssemblyArchiver.createArchive(DefaultAssemblyArchiver.java:186)
            ... 20 more
    Caused by: java.util.zip.ZipException: error in opening zip file
            at java.util.zip.ZipFile.open(Native Method)
            at java.util.zip.ZipFile.<init>(ZipFile.java:214)
            at java.util.zip.ZipFile.<init>(ZipFile.java:144)
            at java.util.zip.ZipFile.<init>(ZipFile.java:158)
            at org.codehaus.plexus.components.io.resources.PlexusIoZipFileResourceCollection.getEntries(PlexusIoZipFileResourceCollection.java:53)
            at org.codehaus.plexus.components.io.resources.AbstractPlexusIoArchiveResourceCollection.getResources(AbstractPlexusIoArchiveResourceCollection.java:76)
            at org.codehaus.plexus.components.io.resources.proxy.PlexusIoProxyResourceCollection.getResources(PlexusIoProxyResourceCollection.java:89)
            at org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:468)
            ... 25 more
    [INFO] ------------------------------------------------------------------------
    

1 个答案:

答案 0 :(得分:3)

通过安装maven(Apache Maven 3.0.4)而不是maven2包并删除~/.m2/目录来解决问题。