Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.3
    • Component/s: None
    • Labels:
      None
    • Environment:
      Ubuntu 11.10 (oneiric)

      Description

      This is a report again org.apache.maven.plugins:maven-assembly-plugin:2.2.2:single (package-assembly) used in conjunction with maven 3.0.3. I'm trying to build ebml-viewer from svn r126 (lastest) at http://code.google.com/p/ebml-viewer/source/checkout . Build fails on Linux, but the developer of ebml-viewer reports that it builds fine on Windows.

      Last lines of output from failed build with 'mvn -DskipTests -X -e package 2>&1 | tee log':

      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 2:37.924s
      [INFO] Finished at: Tue Dec 06 20:30:47 CET 2011
      [INFO] Final Memory: 8M/216M
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.2.2:single (package-assembly) on project ebml-viewer: Failed to create assembly: Error creating assembly archive bin: Failed to retrieve numeric file attributes using: '/bin/sh -c ls -1nlaR /' -> [Help 1]
      org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.2.2:single (package-assembly) on project ebml-viewer: Failed to create assembly: Error creating assembly archive bin: Failed to retrieve numeric file attributes using: '/bin/sh -c ls -1nlaR /'
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
      at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
      at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
      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:616)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
      at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
      at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
      Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to create assembly: Error creating assembly archive bin: Failed to retrieve numeric file attributes using: '/bin/sh -c ls -1nlaR /'
      at org.apache.maven.plugin.assembly.mojos.AbstractAssemblyMojo.execute(AbstractAssemblyMojo.java:504)
      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
      ... 19 more
      Caused by: org.apache.maven.plugin.assembly.archive.ArchiveCreationException: Error creating assembly archive bin: Failed to retrieve numeric file attributes using: '/bin/sh -c ls -1nlaR /'
      at org.apache.maven.plugin.assembly.archive.DefaultAssemblyArchiver.createArchive(DefaultAssemblyArchiver.java:189)
      at org.apache.maven.plugin.assembly.mojos.AbstractAssemblyMojo.execute(AbstractAssemblyMojo.java:445)
      ... 21 more
      Caused by: org.codehaus.plexus.archiver.ArchiverException: Failed to retrieve numeric file attributes using: '/bin/sh -c ls -1nlaR /'
      at org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:439)
      at org.apache.maven.plugin.assembly.filter.ComponentsXmlArchiverFileFilter.finalizeArchiveCreation(ComponentsXmlArchiverFileFilter.java:166)
      at org.codehaus.plexus.archiver.AbstractArchiver.runArchiveFinalizers(AbstractArchiver.java:845)
      at org.codehaus.plexus.archiver.AbstractArchiver.createArchive(AbstractArchiver.java:869)
      at org.apache.maven.plugin.assembly.archive.archiver.AssemblyProxyArchiver.createArchive(AssemblyProxyArchiver.java:512)
      at org.apache.maven.plugin.assembly.archive.DefaultAssemblyArchiver.createArchive(DefaultAssemblyArchiver.java:185)
      ... 22 more
      Caused by: java.io.IOException: Failed to retrieve numeric file attributes using: '/bin/sh -c ls -1nlaR /'
      at org.codehaus.plexus.components.io.attributes.PlexusIoResourceAttributeUtils.executeLs(PlexusIoResourceAttributeUtils.java:281)

      Please refer to the attachment for the complete output.

      1. assembly.txt
        229 kB
        Ben Tilford
      2. assembly-2.4.1.txt
        229 kB
        Ben Tilford
      3. partial_log.bz2
        7 kB
        Thomas Pasch

        Activity

        Hide
        Thomas Pasch added a comment -
        Show
        Thomas Pasch added a comment - Issue at ebml-viewer: http://code.google.com/p/ebml-viewer/issues/detail?id=1
        Hide
        Hung Huynh added a comment -

        I got the same error but the failure to me seem to be coming from maven-jar-plugin. Here's my log

        [INFO] Tests are skipped.
        [INFO] [jar:jar

        {execution: default-jar}

        ]
        [INFO] ------------------------------------------------------------------------
        [ERROR] BUILD ERROR
        [INFO] ------------------------------------------------------------------------
        [INFO] Error assembling JAR

        Embedded error: Failed to read filesystem attributes for: /export1/cruise/jenkins/workspace/terracotta-toolkit-ee_trunk_tests_JROCKIT_1.6_normal/trunk/toolkit-api-ee/pom.xml
        Failed to retrieve numeric file attributes using: '/bin/sh -c ls -1lad /export1/cruise/jenkins/workspace/terracotta-toolkit-ee_trunk_tests_JROCKIT_1.6_normal/trunk/toolkit-api-ee/pom.xml'

        Show
        Hung Huynh added a comment - I got the same error but the failure to me seem to be coming from maven-jar-plugin. Here's my log [INFO] Tests are skipped. [INFO] [jar:jar {execution: default-jar} ] [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Error assembling JAR Embedded error: Failed to read filesystem attributes for: /export1/cruise/jenkins/workspace/terracotta-toolkit-ee_trunk_tests_JROCKIT_1.6_normal/trunk/toolkit-api-ee/pom.xml Failed to retrieve numeric file attributes using: '/bin/sh -c ls -1lad /export1/cruise/jenkins/workspace/terracotta-toolkit-ee_trunk_tests_JROCKIT_1.6_normal/trunk/toolkit-api-ee/pom.xml'
        Hide
        Kristian Rosenvold added a comment -

        This error can always be fixed by upgrading the version of plexus-io used by the plugin to the latest version

        Show
        Kristian Rosenvold added a comment - This error can always be fixed by upgrading the version of plexus-io used by the plugin to the latest version
        Hide
        Oleg Estekhin added a comment -

        What plugins are affected (which version of plexus-io causes this)?

        Who should upgrade the version of plexus-io used by these plugins (should users of such pluging use a dummy plexus-io dependency in their own projects or will the new versions of plugins be released with the fixed dependency)?

        Show
        Oleg Estekhin added a comment - What plugins are affected (which version of plexus-io causes this)? Who should upgrade the version of plexus-io used by these plugins (should users of such pluging use a dummy plexus-io dependency in their own projects or will the new versions of plugins be released with the fixed dependency)?
        Hide
        Leonids M. added a comment -

        workaround (worked for me)

        <fileSet>
                    <directory>${basedir}</directory>
                    <includes>
                        <include>build.sh</include>
                    </includes>
                    <filtered>false</filtered>
                    <outputDirectory>/</outputDirectory>
                </fileSet>
        
        Show
        Leonids M. added a comment - workaround (worked for me) <fileSet> <directory>${basedir}</directory> <includes> <include>build.sh</include> </includes> <filtered> false </filtered> <outputDirectory>/</outputDirectory> </fileSet>
        Hide
        Kristian Rosenvold added a comment -

        Fixed in r1235501

        Show
        Kristian Rosenvold added a comment - Fixed in r1235501
        Hide
        Jamie goodyear added a comment -

        Hi All,

        At Apache Karaf we updated on karaf-2.2.x branch to using assembly plugin 2.3 from 2.2.1 and have seen the above issue begin to occur on Mac OSX 10.7.4 systems. As such we've rolled back to version 2.2.1 https://issues.apache.org/jira/browse/KARAF-1604.

        The test case for mac is to build karaf-2.2.x, you'll observe during the assembly phase that when unix-src is being processed the "ls -1nlaR" error occurs.

        Cheers,
        Jamie

        Show
        Jamie goodyear added a comment - Hi All, At Apache Karaf we updated on karaf-2.2.x branch to using assembly plugin 2.3 from 2.2.1 and have seen the above issue begin to occur on Mac OSX 10.7.4 systems. As such we've rolled back to version 2.2.1 https://issues.apache.org/jira/browse/KARAF-1604 . The test case for mac is to build karaf-2.2.x, you'll observe during the assembly phase that when unix-src is being processed the "ls -1nlaR" error occurs. Cheers, Jamie
        Hide
        Jean-Baptiste Onofré added a comment -

        I second Jamie. I had to rollback to 2.2.1 for have assembly working on MacOS (no problem on Linux).

        I propose to reopen this Jira as it's not fix in 2.3 (on MacOS).

        Show
        Jean-Baptiste Onofré added a comment - I second Jamie. I had to rollback to 2.2.1 for have assembly working on MacOS (no problem on Linux). I propose to reopen this Jira as it's not fix in 2.3 (on MacOS).
        Hide
        Jamie goodyear added a comment -

        Some additional testing information:

        Works on Mac OSX 10.5.8 with Maven 2.2.1 + 1.6.0 Java

        Does NOT work on Mac OSX 10.7.4 with Maven 2.2.1 + 1.6.0 Java

        The plugin works find on Ubuntu 10.04 LTS with Maven 2.2.1 + 1.6.0 Java (Karaf's regular release server).

        Show
        Jamie goodyear added a comment - Some additional testing information: Works on Mac OSX 10.5.8 with Maven 2.2.1 + 1.6.0 Java Does NOT work on Mac OSX 10.7.4 with Maven 2.2.1 + 1.6.0 Java The plugin works find on Ubuntu 10.04 LTS with Maven 2.2.1 + 1.6.0 Java (Karaf's regular release server).
        Hide
        Ben Tilford added a comment -

        Looks like this came back.

        using maven-assembly-plugin:2.4.1 with latest plexus-io

        Show
        Ben Tilford added a comment - Looks like this came back. using maven-assembly-plugin:2.4.1 with latest plexus-io
        Hide
        Kristian Rosenvold added a comment -

        @Ben What version is "latest" plexus-io, there's been quite a few releases there recentlly ?

        Show
        Kristian Rosenvold added a comment - @Ben What version is "latest" plexus-io, there's been quite a few releases there recentlly ?
        Hide
        Kristian Rosenvold added a comment - - edited

        Just for the record; running the build with java7 will make this problem go away, since we did away with the "ls fork" in plexus-io 2.0 for java 7 users . I know this may not be a solution for most of you. (You can still run with source/target 1.5 on the compiler plugin. Most maven releases are done this way at the moment)

        We still aim to keep 1.5 compatibility, but this is one of those ugly hacks that keep separate code paths for jdk versions

        Show
        Kristian Rosenvold added a comment - - edited Just for the record; running the build with java7 will make this problem go away, since we did away with the "ls fork" in plexus-io 2.0 for java 7 users . I know this may not be a solution for most of you. (You can still run with source/target 1.5 on the compiler plugin. Most maven releases are done this way at the moment) We still aim to keep 1.5 compatibility, but this is one of those ugly hacks that keep separate code paths for jdk versions
        Hide
        Kristian Rosenvold added a comment -

        Having looked a bit further at this issue; can someone test this with the latest 2.4.2-SNAPSHOT available from https://repository.apache.org/content/groups/public/ ? I need log output (mvn -e -X) and a full stack trace. The original data is just too old in this issue, and there's been a ton of changes to plexus-io/archiver.

        Show
        Kristian Rosenvold added a comment - Having looked a bit further at this issue; can someone test this with the latest 2.4.2-SNAPSHOT available from https://repository.apache.org/content/groups/public/ ? I need log output (mvn -e -X) and a full stack trace. The original data is just too old in this issue, and there's been a ton of changes to plexus-io/archiver.
        Hide
        Ben Tilford added a comment -

        @Kristian Rosenvold I'm Using maven 3.1.1 on JDK 6.

        Plugin config is

        <plugin>
                            <artifactId>maven-assembly-plugin</artifactId>
                            <version>2.4.1</version>
                            <executions>
                                <execution>
                                    <id>package</id>
                                    <phase>package</phase>
                                    <goals>
                                        <goal>single</goal>
                                    </goals>
                                    <configuration>
                                       <appendAssemblyId>true</appendAssemblyId>
                                        <descriptors>
                                            <descriptor>assembly.xml</descriptor>
                                        </descriptors>
                                        <!--<tarLongFileMode>gnu</tarLongFileMode>-->
                                    </configuration>
                                </execution>
                            </executions>
                            <dependencies>
                                <dependency>
                                    <groupId>org.codehaus.plexus</groupId>
                                    <artifactId>plexus-io</artifactId>
                                    <version>2.1.3</version>
                                </dependency>
                            </dependencies>
                        </plugin>
        

        Doing a test on JDK 7 and it seemed to work on linux howerver JDK 7 on mac seems to produce the error.

        MAC Version Info
        mvn -v
        Apache Maven 3.2.3 (33f8c3e1027c3ddde99d3cdebad2656a31e8fdf4; 2014-08-11T14:58:10-06:00)
        Maven home: /usr/local/apache-maven/apache-maven-3.2.3
        Java version: 1.7.0_67, vendor: Oracle Corporation
        Java home: /Library/Java/JavaVirtualMachines/jdk1.7.0_67.jdk/Contents/Home/jre
        Default locale: en_US, platform encoding: UTF-8
        OS name: "mac os x", version: "10.9.5", arch: "x86_64", family: "mac"
        
        Show
        Ben Tilford added a comment - @Kristian Rosenvold I'm Using maven 3.1.1 on JDK 6. Plugin config is <plugin> <artifactId>maven-assembly-plugin</artifactId> <version>2.4.1</version> <executions> <execution> <id> package </id> <phase> package </phase> <goals> <goal>single</goal> </goals> <configuration> <appendAssemblyId> true </appendAssemblyId> <descriptors> <descriptor>assembly.xml</descriptor> </descriptors> <!--<tarLongFileMode>gnu</tarLongFileMode>--> </configuration> </execution> </executions> <dependencies> <dependency> <groupId>org.codehaus.plexus</groupId> <artifactId>plexus-io</artifactId> <version>2.1.3</version> </dependency> </dependencies> </plugin> Doing a test on JDK 7 and it seemed to work on linux howerver JDK 7 on mac seems to produce the error. MAC Version Info mvn -v Apache Maven 3.2.3 (33f8c3e1027c3ddde99d3cdebad2656a31e8fdf4; 2014-08-11T14:58:10-06:00) Maven home: /usr/local/apache-maven/apache-maven-3.2.3 Java version: 1.7.0_67, vendor: Oracle Corporation Java home: /Library/Java/JavaVirtualMachines/jdk1.7.0_67.jdk/Contents/Home/jre Default locale: en_US, platform encoding: UTF-8 OS name: "mac os x" , version: "10.9.5" , arch: "x86_64" , family: "mac"
        Hide
        Kristian Rosenvold added a comment - - edited

        No-one has reported a stacktrace/log from a recent version of assembly. I need this.
        @Ben Run with mvn -e -X.

        You can update the version of plexus-io in use by the assembly plugin to version 2.0.12, which may also solve the mac-related problem (add dependency under plugin in your pom).

        Show
        Kristian Rosenvold added a comment - - edited No-one has reported a stacktrace/log from a recent version of assembly. I need this. @Ben Run with mvn -e -X. You can update the version of plexus-io in use by the assembly plugin to version 2.0.12, which may also solve the mac-related problem (add dependency under plugin in your pom).
        Hide
        Ben Tilford added a comment - - edited

        Attaching output from

        Linux
        Maven 3
        JDK 6

        Yesterday several people on Mac, Maven 3, JDK 7 were failing but today they are working. If it helps this problem pops up every couple weeks for the mac users then goes away.

        Show
        Ben Tilford added a comment - - edited Attaching output from Linux Maven 3 JDK 6 Yesterday several people on Mac, Maven 3, JDK 7 were failing but today they are working. If it helps this problem pops up every couple weeks for the mac users then goes away.
        Hide
        Kristian Rosenvold added a comment -

        @Ben; you claim to be running assembly 2.4.1 but your log file shows you are running version 2.2.2. I suggest you try to find the cause of this first.

        Show
        Kristian Rosenvold added a comment - @Ben; you claim to be running assembly 2.4.1 but your log file shows you are running version 2.2.2. I suggest you try to find the cause of this first.
        Hide
        Ben Tilford added a comment - - edited

        Dependency management was off but issue is still there with 2.4.1

        Re-uploaded

        Show
        Ben Tilford added a comment - - edited Dependency management was off but issue is still there with 2.4.1 Re-uploaded

          People

          • Assignee:
            Kristian Rosenvold
            Reporter:
            Thomas Pasch
          • Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development