Uploaded image for project: 'Maven WAR Plugin'
  1. Maven WAR Plugin
  2. MWAR-341

Overlay task fails on unpacking when applying file permissions

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.5
    • Fix Version/s: 2.6
    • Component/s: overlay
    • Labels:
      None
    • Environment:
      Maven 3.2.2, Linux/Windows

      Description

      If a WAR file created on windows (using the maven-war-plugin 2.5) is used as overlay base for a build running on linux the unpacking fails:

      Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-war of goal org.apache.maven.plugins:maven-war-plugin:2.5:war failed: file mode must be 3 or 4 characters
      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
      ... 27 more
      Caused by: java.lang.IllegalArgumentException: file mode must be 3 or 4 characters
      at org.codehaus.plexus.archiver.util.FilePermissionUtils.getFilePermissionFromMode(FilePermissionUtils.java:55)
      at org.codehaus.plexus.archiver.util.ArchiveEntryUtils.applyPermissionsWithJvm(ArchiveEntryUtils.java:149)
      at org.codehaus.plexus.archiver.util.ArchiveEntryUtils.chmod(ArchiveEntryUtils.java:77)
      at org.codehaus.plexus.archiver.AbstractUnArchiver.extractFile(AbstractUnArchiver.java:341)
      at org.codehaus.plexus.archiver.zip.AbstractZipUnArchiver.extractFileIfIncluded(AbstractZipUnArchiver.java:188)
      at org.codehaus.plexus.archiver.zip.AbstractZipUnArchiver.execute(AbstractZipUnArchiver.java:151)
      at org.codehaus.plexus.archiver.AbstractUnArchiver.extract(AbstractUnArchiver.java:129)
      at org.apache.maven.plugin.war.packaging.AbstractWarPackagingTask.doUnpack(AbstractWarPackagingTask.java:282)
      at org.apache.maven.plugin.war.packaging.OverlayPackagingTask.unpackOverlay(OverlayPackagingTask.java:118)
      at org.apache.maven.plugin.war.packaging.OverlayPackagingTask.performPackaging(OverlayPackagingTask.java:70)
      at org.apache.maven.plugin.war.AbstractWarMojo.buildWebapp(AbstractWarMojo.java:483)
      at org.apache.maven.plugin.war.AbstractWarMojo.buildExplodedWebapp(AbstractWarMojo.java:411)
      at org.apache.maven.plugin.war.WarMojo.performPackaging(WarMojo.java:213)
      at org.apache.maven.plugin.war.WarMojo.execute(WarMojo.java:176)
      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)

      Downgrading the war-plugin to 2.4 on the linux build enviroment doesn't help. But if I downgrade to 2.4 on the windows machine building the base WAR then the resulting war can be used on linux as base WAR without any problems. So there must be an issue related to (setting/storing) file permissions on building the WAR file. Maybe it's releated to https://jira.codehaus.org/browse/PLXCOMP-280 ?

      The issue is breaking some of our builds as we run CI on linux, but creating releases mostly on windows.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                khmarbaise Karl Heinz Marbaise
                Reporter:
                m.rothe Marco Rothe
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: