Reason Error Assembling War Webxml Attribute Is Required
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the error assembling war webxml attribute is required (or pre-existing web-inf/web.xml if executing workings and policies of this site About Us Learn more about Stack
Failed To Execute Goal Org.apache.maven.plugins:maven-war-plugin:2.2:war (default-war) On Project
Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions error assembling war webxml attribute is required spring boot Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join
Failed To Execute Goal Org.apache.maven.plugins:maven-war-plugin:2.1.1:war (default-war) On Project
them; it only takes a minute: Sign up “webxml attribute is required” error in Maven up vote 208 down vote favorite 39 I am getting the following error: Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode) I have got web.xml in right place which is projectname\src\main\webapp\WEB-INF\web.xml What could be causing this? maven maven web.xml location war share|improve this question edited Jun 19 '14 at 20:09 ArtB 7,2231564104 asked Mar 18 '11 at 12:25 user617966 1,68541524 1 is your packaging set to war in the pom? –crowne Mar 18 '11 at 17:15 add a comment| 14 Answers 14 active oldest votes up vote 257 down vote It would be helpful if you can provide a code snippet of your maven-war-plugin. Looks like the web.xml is at right place, still you can try and give the location explicitly
App EngineApache AntApache MavenjQueryJava MongoDBQuartz SchedulerLog4jContact Us Maven - webxml attribute is requiredBy mkyong | January 27, 2016 | Viewed : 7,167 times
Maven Web.xml Example
+247 pv/wMaven package a web application and hits the
false
following error message : $ mvn package //... [ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war (default-war) maven-war-plugin version on project spring4-mvc-maven-ajax-example: Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode) -> [Help 1] Solution1. For http://stackoverflow.com/questions/5351948/webxml-attribute-is-required-error-in-maven servlet container < 3, make sure WEB-INF/web.xml file exists.2. For servlet container >=3, and NO web.xml web application, declares the following maven-war-plugin plugin, and set the failOnMissingWebXml option to false.pom.xml
required. [INFO] ----------------------------------------------------------- [INFO] BUILD FAILURE [INFO] ----------------------------------------------------------- [INFO] Total time: 1.694s [INFO] Finished at: Tue Feb 05 15:21:46 CST 2013 http://adaprognotebook.blogspot.com/2013/02/mfaq-error-assembling-war-webxml.html [INFO] Final Memory: 10M/21M [INFO] ----------------------------------------------------------- [ERROR] Failed to execute goal http://www.technicalkeeda.com/maven-tutorial/failed-to-execute-goal-error-assembling-war-webxml-attribute-is-required org.apache.maven.plugins:maven-war-plugin:2.1.1:war (default-war) on project {project name}: Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode) -> [Help 1] Cause: The maven-war-plugin plugin is not configured. Solution:Add the following section in the pom.xml. pom.xml
4 MVC web project, facing below issue with Maven build, because maven-war-plugin not able to find web.xml at default location WEB-INF/web.xml Error assembling WAR: webxml attribute is required As I am using Java Based Configuration for Servlet 3+ version and no need to have web.xml file in my web project. [ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war (default-war) on project Spring4Examples: Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode) Log details [INFO] Scanning for projects... [WARNING] [WARNING] Some problems were encountered while building the effective model for com.technicalkeeda:Spring4Examples:war:1.0 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 12, column 12 [WARNING] [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. [WARNING] [WARNING] For this reason, future Maven versions might no longer support building such malformed projects. [WARNING] [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building Spring4Examples 1.0 [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ Spring4Examples --- [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] Copying 0 resource [INFO] [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ Spring4Examples --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ Spring4Examples --- [WARNING] Using platform encoding (Cp1252 actually) to copy filter