I have a mavenized codebased configured Spring 3.2.4 web app. When I build the app with Maven/pom.xml first I got an error that web.xml is missing. first I tried to create an empty web.xml. this was the moment when The project facets changed (and I don't know why). It switched from dynamic Web Module 3.0 to 3.1 and this is irreversible. How can I change it again into Dynamic Web Modules 3.0???
Additionally I can't remove the JAX-RS. Trying this it results in:
Failed while uninstalling JAX-RS (REST Web Services) 1.0. org.eclipse.jst.javaee.web.internal.impl.WebAppImpl cannot be cast to org.eclipse.jst.j2ee.webapplication.WebApp
Later I found out that I can avoid the Maven compile error by inserting the according plugin into pom.xml:
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>2.4</version> <configuration> <failOnMissingWebXml>false</failOnMissingWebXml> </configuration> </plugin>
Dynamic Web Module version correlates with Servlet API version . Ideally a Servlet is an object that receives a request and generates a response based on that request. Take a look at below image from wikipedia, it's Servlet API history.
Show activity on this post. Step 1: Click on Help and then click on “Install New Software”. Step 3: Scroll down to find “Web, XML, Java EE and OSGI Enterprise Development” option and expand it. Step 5: Click next and you should see that the software is installing.
I had similar troubles in eclipse and the only way to fix it for me was to
Just make sure you configure the web module before applying it as by default it will look for your web files in /WebContent/ and this is not what Maven project structure should be.
EDIT:
Here is a second way in case nothing else helps
org.eclipse.wst.common.project.facet.core.xml
, make backup, and remove the web module entry. If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With