[ http://jira.codehaus.org/browse/MWAR-53?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_90955 ]
Piotr Tabor commented on MWAR-53: --------------------------------- The issue depends on org.codehaus.plexus.archiver.war.WarArchiver class (initZipOutputStream method), which doesn't allow to create war file without "web.xml" descriptor. The Ant WAR task doesn't allow this neither (org.apache.tools.ant.taskdefs.War) When I changed the maven-war-plugin to ignore lack of the file (warn only), I got the result: [INFO] Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode) [INFO] ------------------------------------------------------------------------ [DEBUG] Trace org.apache.maven.lifecycle.LifecycleExecutionException: Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:564) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:330) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:123) at org.apache.maven.cli.MavenCli.main(MavenCli.java:272) 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: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode) at org.apache.maven.plugin.war.WarMojo.execute(WarMojo.java:146) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:420) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539) ... 16 more Caused by: org.codehaus.plexus.archiver.ArchiverException: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode) at org.codehaus.plexus.archiver.war.WarArchiver.initZipOutputStream(WarArchiver.java:148) at org.codehaus.plexus.archiver.zip.AbstractZipArchiver.createArchiveMain(AbstractZipArchiver.java:348) at org.codehaus.plexus.archiver.zip.AbstractZipArchiver.createArchive(AbstractZipArchiver.java:250) at org.apache.maven.archiver.MavenArchiver.createArchive(MavenArchiver.java:402) at org.apache.maven.plugin.war.WarMojo.performPackaging(WarMojo.java:188) at org.apache.maven.plugin.war.WarMojo.execute(WarMojo.java:130) ... 18 more So I think, the issue shouldn't be fixed. The possibility to cope with overlay's problem will be provided in other way. > WAR plugin does not allow for ignoring the web.xml file > ------------------------------------------------------- > > Key: MWAR-53 > URL: http://jira.codehaus.org/browse/MWAR-53 > Project: Maven 2.x War Plugin > Issue Type: Bug > Affects Versions: 2.0 > Reporter: Andreas Schildbach > > The WAR plugin does not allow for ignoring the web.xml file. I know that a > WAR without web.xml does not make any sense in the normal use case, but if > I'd like to overlay/join WARs with the WAR plugin (by defining dependencies > to other WARs), there can be only one web.xml in the candidates (the WAR > plugin does not join web.xml like cargo uberwar does). > If I do not have a web.xml in my src/main/webapp folder, the WAR plugin > complains. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira