Marco Rothe created MWAR-341:
--------------------------------
Summary: Overlay task fails on unpacking when applying file
permissions
Key: MWAR-341
URL: https://jira.codehaus.org/browse/MWAR-341
Project: Maven WAR Plugin
Issue Type: Bug
Components: overlay
Affects Versions: 2.5
Environment: Maven 3.2.2, Linux/Windows
Reporter: Marco Rothe
Priority: Critical
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 doen'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.
--
This message was sent by Atlassian JIRA
(v6.1.6#6162)