Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml maven on war

Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml maven on war

You might come across this error when building a web application on maven using the command

mvn war:war

This would be caused if maven is not aware of where the web.xml file is located.
If you follow the standard maven directory structure as

src/main/java
src/main/resources
src/main/webapp

You would have to copy the contents of WebContent [WEB-INF AND META-INF] to src/main/webapp folder – there maven would get it as expected.

See how you would solve these known algorithm problems

Find the first occurence of number in the sorted array

Find K Complementary numbers from array Java implementation

Check if two strings are anagrams or not

Kadane’s algorithm in C – Dynamic Programming

binary tree problems with solution

Implementing tokenizer and adding tokens to the linked list

String Ordered Permutation Algorithm Problem

testing k complementary pairs algorithm with junit

Find the pairs that makes K Complementary in the given array java solution

Changing decimal number to its binary equivalent

2 Comments
  1. jonested

    This is the most straightforward explanation I have come across for this error. Thanks for posting.

    1. gullele

      Thanks for reading and dropping a line.

Leave a Reply

Your email address will not be published. Required fields are marked *

*
*