I am using Maven 3.0.5 and Spring Tool Source 3.2 with Maven plugin installed. When I try to do \'Run As---> Maven install\', I am getting
We tried everything listed so far and it still failed. The error also mentioned
(default-war) on project utilsJava: Error assembling WAR: webxml attribute is required
The solution that finally fixed it was adding this to POM:
<failOnMissingWebXml>false</failOnMissingWebXml>
As mentioned here Error assembling WAR - webxml attribute is required
Our POM now contains this:
<plugin>
<inherited>true</inherited>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>${maven-war-plugin.version}</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
<warName>${project.artifactId}</warName>
<attachClasses>true</attachClasses>
</configuration>
</plugin>
Maybe you can add this dependency to your pom.xml. I use this method and solve the problem!
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.3.2</version>
</dependency>
for the new users on Mac os , find out .m2 folder and delete it, its on your /Users/.m2 directory.
you wont get to see .m2 folder in finder(File Explorer), for this user this command to Show Mac hidden files
$ defaults write com.apple.finder AppleShowAllFiles TRUE
after this press alt and click on finder-> relaunch, you can see /Users/.m2
to hide files again, simply use this $ defaults write com.apple.finder AppleShowAllFiles false
It is because your Maven not able to find settings file. If deleting .m2 not work, try below solution
Go to your JOB configuration
than to the Build section
Add build step :- Invoke top level maven target and fill Maven version and Goal
than click on Advance button and mention settings file path as mention in image
Usually, define maven-compiler-plugin is sufficient enough. add the following to your compiler plugin definition.
<plugin>
<inherited>true</inherited>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>