org.apache.maven.lifecycle.LifecycleExecutionException: Error assembling WAR

Apache's JIRA Issue Tracker | Laurent Dauvilaire | 1 decade ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    The package action fails when file name are too long. Note: the file creating the error can be created by hand. (echo yes > d:\Home\LDauvilaire\src\Repository\SVN\JHub\modules\display-webapp\modules\hub-internal\..\..\..\..\target\dev\3.0.20\hub-webapp-internal\hub-webapp-internal-3.0.20\fceditor\editor\dialog\fck_spellerpages\spellerpages\server-scripts\spellchecker.cfm) See stack trace below: [INFO] [war:war] [INFO] Exploding webapp... [INFO] Copy webapp resources to d:\Home\LDauvilaire\src\Repository\SVN\JHub\modules\display-webapp\modules\hub-internal\..\..\..\..\target\dev\3.0.20\hub-webapp-internal\hub-webapp-internal-3.0.20 [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Error assembling WAR Embedded error: Could not explode webapp... d:\Home\LDauvilaire\src\Repository\SVN\JHub\modules\display-webapp\modules\hub-internal\..\..\..\..\target\dev\3.0.20\hub-webapp-internal\hub-webapp-internal-3.0.20\fceditor\editor\dialog\fck_spellerpages\spellerpages\server-scripts\spellchecker.cfm (The filename, directory name, or volume label syntax is incorrect) [INFO] ------------------------------------------------------------------------ [INFO] Trace org.apache.maven.lifecycle.LifecycleExecutionException: Error assembling WAR at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115) at org.apache.maven.cli.MavenCli.main(MavenCli.java:256) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) 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: Error assembling WAR at org.apache.maven.plugin.war.WarMojo.execute(WarMojo.java:91) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534) ... 16 more Caused by: org.apache.maven.plugin.MojoExecutionException: Could not explode webapp... at org.apache.maven.plugin.war.AbstractWarMojo.buildExplodedWebapp(AbstractWarMojo.java:202) at org.apache.maven.plugin.war.WarMojo.performPackaging(WarMojo.java:108) at org.apache.maven.plugin.war.WarMojo.execute(WarMojo.java:86) ... 18 more Caused by: java.io.FileNotFoundException: d:\Home\LDauvilaire\src\Repository\SVN\JHub\modules\display-webapp\modules\hub-internal\..\..\..\..\target\dev\3.0.20\hub-webapp-internal\hub-webapp-internal-3.0.20\fceditor\editor\dialog\fck_spellerpages\spellerpages\server-scripts\spellchecker.cfm (The filename, directory name, or volume label syntax is incorrect) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.<init>(FileOutputStream.java:179) at java.io.FileOutputStream.<init>(FileOutputStream.java:131) at org.codehaus.plexus.util.FileUtils.copyFile(FileUtils.java:821) at org.apache.maven.plugin.war.AbstractWarMojo.copyResources(AbstractWarMojo.java:230) at org.apache.maven.plugin.war.AbstractWarMojo.buildExplodedWebapp(AbstractWarMojo.java:196) ... 20 more

    Apache's JIRA Issue Tracker | 1 decade ago | Laurent Dauvilaire
    org.apache.maven.lifecycle.LifecycleExecutionException: Error assembling WAR
  2. 0

    maven builds fails inside ubuntu vagrant machine as well as docker instance

    Stack Overflow | 2 years ago | Rohan
    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.4:war (default-war) on project <my-app>: Could not copy webapp classes [/vagrant_data/<my-app-src>/<my-app>/target/classes] [/vagrant_data/<my-app-src>/<my-app>/target/classes]
  3. 0

    Web project doesn't apply the changes

    Stack Overflow | 1 year ago | Tiago Neto
    org.apache.maven.plugin.MojoExecutionException: C:\Users\Tiago\Desktop\B2BWeb\target\classes\main\resources\web\html\partials\manageProducts.html (The requested operation cannot be performed on a file with a user-mapped section open)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    We've got a Crucible plugin that comes with a bunch of dependencies that are bundled by the atlassian plugin packager. Unfortunately, "mvn package" fails complaining it cannot copy a LICENSE file to target/classes: org.apache.maven.lifecycle.LifecycleExecutionException: Error copying file 'license/LICENSE' to '/Users/ervzijst/Documents/workspace/jackrabbit-scm-plugin/target/classes/license/LICENSE' at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:583) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129) at org.apache.maven.cli.MavenCli.main(MavenCli.java:287) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) 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: Error copying file 'license/LICENSE' to '/Users/ervzijst/Documents/workspace/jackrabbit-scm-plugin/target/classes/license/LICENSE' at com.atlassian.maven.plugins.pdk.BundleJarsMojo.copyDependencyContents(BundleJarsMojo.java:388) at com.atlassian.maven.plugins.pdk.BundleJarsMojo.bundleDependencies(BundleJarsMojo.java:203) at com.atlassian.maven.plugins.pdk.BundleJarsMojo.execute(BundleJarsMojo.java:100) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558) ... 16 more Caused by: java.io.FileNotFoundException: /Users/ervzijst/Documents/workspace/jackrabbit-scm-plugin/target/classes/license/LICENSE (Not a directory) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.<init>(FileOutputStream.java:179) at java.io.FileOutputStream.<init>(FileOutputStream.java:131) at org.codehaus.plexus.util.FileUtils.copyFile(FileUtils.java:797) at com.atlassian.maven.plugins.pdk.BundleJarsMojo.copyFileIfModified(BundleJarsMojo.java:267) at com.atlassian.maven.plugins.pdk.BundleJarsMojo.copyDependencyContents(BundleJarsMojo.java:384) ... 20 more After closer inspection, this seems to be caused by the fact that some of the dependency jars have a file named "license" in the root, while others have a directory "license/" in the root. What seems to happen is that during packaging, atlassian plugins first expands a jar file that comes with a file "license" (which ends up in target/classes) and then proceeds to expand a jar that contains "license/license.txt". This directory cannot be written over the existing file and maven dies. After I ran a script that removes every license file and directory from every jar file in ~/m2/**/*jar (not recommended unless you have some time to kill ;) ) it worked. I guess plugins should not all be expanded in the same directory, but instead be copied into a lib/ dir in the target jar. P.S. Our pom files contain: <parent> <groupId>com.atlassian.crucible.plugin.base</groupId> <artifactId>crucible-plugin-base</artifactId> <version>1-SNAPSHOT</version> </parent>

    Ecosystem JIRA | 8 years ago | Erik van Zijst
    org.apache.maven.lifecycle.LifecycleExecutionException: Error copying file 'license/LICENSE' to '/Users/ervzijst/Documents/workspace/jackrabbit-scm-plugin/target/classes/license/LICENSE'
  6. 0

    org.apache.maven.plugins:maven-resources-plugin:2.5:resources (No such file or directory) -> [Help 1]

    Stack Overflow | 6 months ago | Ema.jar
    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:2.5:resources (default-resources) on project locanda: /opt/h2/databases/locanda.h2.db (No such file or directory)
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.io.FileNotFoundException

    d:\Home\LDauvilaire\src\Repository\SVN\JHub\modules\display-webapp\modules\hub-internal\..\..\..\..\target\dev\3.0.20\hub-webapp-internal\hub-webapp-internal-3.0.20\fceditor\editor\dialog\fck_spellerpages\spellerpages\server-scripts\spellchecker.cfm (The filename, directory name, or volume label syntax is incorrect)

    at java.io.FileOutputStream.open()
  2. Java RT
    FileOutputStream.<init>
    1. java.io.FileOutputStream.open(Native Method)
    2. java.io.FileOutputStream.<init>(FileOutputStream.java:179)
    3. java.io.FileOutputStream.<init>(FileOutputStream.java:131)
    3 frames
  3. Plexus Common Utilities
    FileUtils.copyFile
    1. org.codehaus.plexus.util.FileUtils.copyFile(FileUtils.java:821)
    1 frame
  4. org.apache.maven
    WarMojo.execute
    1. org.apache.maven.plugin.war.AbstractWarMojo.copyResources(AbstractWarMojo.java:230)
    2. org.apache.maven.plugin.war.AbstractWarMojo.buildExplodedWebapp(AbstractWarMojo.java:196)
    3. org.apache.maven.plugin.war.WarMojo.performPackaging(WarMojo.java:108)
    4. org.apache.maven.plugin.war.WarMojo.execute(WarMojo.java:86)
    4 frames
  5. Maven Plugin
    DefaultPluginManager.executeMojo
    1. org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
    1 frame
  6. Maven Core
    DefaultMaven.execute
    1. org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
    2. org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
    3. org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
    4. org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
    5. org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
    6. org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
    7. org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
    8. org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
    8 frames
  7. M3 Interceptor
    MavenCli.main
    1. org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
    1 frame
  8. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    4. java.lang.reflect.Method.invoke(Method.java:585)
    4 frames
  9. Plexus
    Launcher.main
    1. org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
    2. org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
    3. org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
    4. org.codehaus.classworlds.Launcher.main(Launcher.java:375)
    4 frames