After rejecting the mvn package inside Eclipse, but after the terminal shutdown, I realized that Eclipse was running Maven 3.3.3 , while the terminal was running 3.3.9 . I tried and, by all accounts, managed to reconfigure the eclipse by going to Eclipse -> Preferences -> Maven -> Installations and pointing to my folder 3.3.9 . I restarted Eclipse and tried again, but was not available. In addition, when you try to build, changes to the pom.xml file pom.xml not confirmed. I have inserted inappropriate slashes and other characters and can only generate this error:
WAR build error: web.xml attribute required (or existing WEB-INF / web.xml when running in update mode)
I modified my pom file according to this recommendation, but, as I said, maven does not recognize the changes in pom, and I cannot run mvn --version to create 3.3.9 , as you would expect. I attached my pom.xml below
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.javawebtutor</groupId> <artifactId>LoginWebApp</artifactId> <packaging>war</packaging> <version>1.0-SNAPSHOT</version> <name>LoginWebApp Maven Webapp</name> <url>http://maven.apache.org</url> <dependencies> <dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <version>2.5</version> </dependency> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>5.1.30</version> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.10</version> </dependency> </dependencies> <build> <finalName>LoginWebApp</finalName> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <configuration> <webXml>src\main\webapp\WEB-INF\web.xml</webXml> </configuration> </plugin> </plugins> </build>
source share