I think you need to set failOnMissingWebXml to false in the plugin 
configuration. See 
http://maven.apache.org/plugins/maven-war-plugin/war-mojo.html#failOnMissingWebXml

Justin

-----Original Message-----
From: arungupta [mailto:arun.gu...@gmail.com] 
Sent: Monday, August 10, 2009 2:15 PM
To: users@maven.apache.org
Subject: RE: Exclude "web.xml" from war packaging


Servlet 3.0 makes the web.xml completely optional and all of that information 
can be specified using annotations in the Servlet itself. I'm trying a Wicket 
sample and manually copy all the filter registration from "web.xml"
to "META-INF/web-fragment.xml" of wicket-1.4.0.jar and then remove web.xml.
GlassFish v3 (which is Servlet 3.0 compliant) seems to handle it fine.

Just trying to understand if all of this can be automated using the default 
pom.xml generated by the Wicket quickstart.

-Arun


mgainty wrote:
> 
> 
> if web.xml is excluded from war to be deployed where would the 
> container read the configuration servlet-mapping,welcome-file ?
> Martin Gainty
> ______________________________________________
> Verzicht und Vertraulichkeitanmerkung/Note de déni et de 
> confidentialité
>  
> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene 
> Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede 
> unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. 
> Diese Nachricht dient lediglich dem Austausch von Informationen und 
> entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten 
> Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt 
> uebernehmen.
> Ce message est confidentiel et peut être privilégié. Si vous n'êtes 
> pas le destinataire prévu, nous te demandons avec bonté que pour 
> satisfaire informez l'expéditeur. N'importe quelle diffusion non 
> autorisée ou la copie de ceci est interdite. Ce message sert à 
> l'information seulement et n'aura pas n'importe quel effet légalement 
> obligatoire. Étant donné que les email peuvent facilement être sujets 
> à la manipulation, nous ne pouvons accepter aucune responsabilité pour le 
> contenu fourni.
> 
> 
> 
> 
>> Date: Mon, 10 Aug 2009 10:50:01 -0700
>> Subject: Exclude "web.xml" from war packaging
>> From: arun.gu...@gmail.com
>> To: users@maven.apache.org
>> 
>> I'd like to exclude web.xml from WAR packaging and tried
>> 
>> <packagingExcludes>WEB-INF/*.xml</packagingExcludes>
>> 
>> and
>> 
>> <webResources>
>>                         <resource>
>>                             <directory>src</directory>
>>                             <excludes>
>>                                 <exclude>**/*.xml</exclude>
>>                             </excludes>
>>                         </resource>
>>                     </webResources>
>> 
>> but Maven seems to complain:
>> 
>> Caused by: org.apache.maven.plugin.MojoExecutionException: Error 
>> assembling WAR: Deployment descriptor:
>> /Users/arungupta/samples/running/helloworld/target/helloworld-1.0-SNA
>> PSHOT/WEB-INF/web.xml
>> does not exist.
>>         at org.apache.maven.plugin.war.WarMojo.execute(WarMojo.java:146)
>>         at
>> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
>>         at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
>>         ... 16 more
>> 
>> Any idea on how can I exclude "web.xml" from WAR packaging ?
>> 
>> -Arun
>> 
>> --
>> Need Application Server ? - Download glassfish.org
>> Blog: http://blogs.sun.com/arungupta
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>> For additional commands, e-mail: users-h...@maven.apache.org
>> 
> 
> _________________________________________________________________
> Get free photo software from Windows Live
> http://www.windowslive.com/online/photos?ocid=PID23393::T:WLMTAGL:ON:W
> L:en-US:SI_PH_software:082009
> 

--
View this message in context: 
http://www.nabble.com/Exclude-%22web.xml%22-from-war-packaging-tp24904301p24904690.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to