Maven Grails Error Assembling War Webxml Attribute Is Required
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you
Failed To Execute Goal Org.apache.maven.plugins:maven-war-plugin:2.2:war (default-war) On Project
might have Meta Discuss the workings and policies of this site error assembling war webxml attribute is required (or pre-existing web-inf/web.xml i About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or
Failed To Execute Goal Org.apache.maven.plugins:maven-war-plugin:2.1.1:war (default-war) On Project
posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of error assembling war webxml attribute is required spring boot 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Maven Error assembling WAR: webxml attribute is required when building the SpringMVC project with pure Java Based Configuration and no xml's up vote 5 down vote favorite 3 I am developing a Spring MVC project with pure maven web.xml location Java based configuration. I am getting the error below when I do a Maven clean install. Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war (default-war) on project SpringMVC-ShoppingCart: Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode) -> [Help 1] The error says that web.xml is missing, but I did not have one since I used pure Java based configuration. How to make sure that the project builds and creates war file without web.xml? java maven spring-mvc web-applications maven-assembly-plugin share|improve this question edited Oct 28 '15 at 12:02 Tunaki 57.5k1886117 asked Oct 28 '15 at 11:59 Omkar Puttagunta 1,2421716 add a comment| 1 Answer 1 active oldest votes up vote 9 down vote accepted You need to configure the maven-war-plugin to ignore the missing web.xml file with the failOnMissingWebXml attribute set to false. By default, this plugin expects a web.xml, which explains the error you are getting. Sample configuration:
App EngineApache AntApache MavenjQueryJava MongoDBQuartz SchedulerLog4jContact Us Maven - webxml attribute is requiredBy mkyong | January 27,
Maven Web.xml Example
2016 | Viewed : 6,920 times +238 pv/wMaven package selected war files include a web-inf/web.xml which will be ignored a web application and hits the following error message : $ mvn
Maven-war-plugin Version
package //... [ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war (default-war) on project spring4-mvc-maven-ajax-example: Error assembling WAR: webxml attribute is required (or pre-existing http://stackoverflow.com/questions/33390460/maven-error-assembling-war-webxml-attribute-is-required-when-building-the-sprin WEB-INF/web.xml if executing in update mode) -> [Help 1] Solution1. For 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 https://www.mkyong.com/maven/maven-webxml-attribute-is-required/
Started Install What is a POM? Convention over Configuration New Project Project Management Parent POM Local Maven Repository Multiple Artifacts from a Single Source Release Plugin Aggregate POM Dependency Management Distribution Zip Conclusions http://blogs.sourceallies.com/2011/06/maven-3-tutorial-project-setup/ Overview What is Maven? Maven is a software project management and comprehension tool that http://www.it610.com/article/4376764.htm includes: build tools, dependency management, project reporting and much more. I say "much more" because at the core Maven is a plugin execution framework. There are plugins supported by the Maven project (http://maven.apache.org/plugins/index.html), plugins supported by Mojo Project (http://mojo.codehaus.org/plugins.html), and third party plugins. If you can find or write a plugin, Maven can run it. Plugins Plugins error assembling are configured to run during specific phases in the Maven lifecycle. The high-level phases that make up the build lifecycle include: validation, compile, test, package, integration-test, verify, install, and deploy. An exhaustive list of build phases can be found at http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html#Lifecycle_Reference. Why not Ant and Ivy? People always gravitate to this question of whether Maven is better than Ant and Ivy. Unfortunately this is not a fare comparison. Ant is a build error assembling war tool and Ivy is a dependency management tool. Maven is not just a build tool or just a dependency management tool. On the contrary, Maven is a project management tool that embodies software development best practices. To illustrate this point I will share a story from my early years in software development. Our shop used Ant without Ivy. Ivy didn't become a full fledged Apache project until October, 2007. Each team had their own Ant build. As we began to move from team to team we had to find out which targets needed to be run. Over time we decided on a set of names that every team needed to implement. This helped but just because the target was named the same thing it did not mean they worked the same way. Long story short, we began to meet to create a shared standard. During this long process we were introduced to Maven. Ironically, Maven had accepted standards for many of the issues that we were trying address. Maven was not just a standard for our company it was a standard for all Maven users. New employees that were familiar with Maven had a good grasp of how we managed our projects. Maven provided a standard that not only addressed our con
info5 > 正文 Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in 发表于: 2014-05-07 作者:lizhitao 来源:转载 浏览次数: 取消收藏 收藏 error assembling war maven webxml attrib webxml attr 分享到:新浪微博微信腾讯微博人人网有道云笔记QQ空间 Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in 【Maven】Maven部署Web项目报错webxml attribute is required eclipse创建的maven丢失/WEB-INF/web.xml文件 Error:executing aidl:return code 1 【ERROR】---Error executing "adb devices":ADB server didn't ACK 摘要: 今天一个web项目启动报错:错误信息如下[ERROR]Failedtoexecutegoalorg.apache.maven.plugins:maven-war-plugin:2.2:war(default-war)onprojectmafka-cms:ErrorassemblingWAR:webxmlattributeisrequired(orpre-existingWEB-INF/web.xm 今天一个web项目启动报错:错误信息如下 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war (default-war) on project mafka-cms: Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode) -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException 页面也无法正常显示,报404错误 原因说明: maven的web项目默认的webroot是在src\main\webapps。如果在此目录下找不到web.xml就抛出以上的异常 解决方式: 在web工程pom.xml中增加plugin配置: