How to change java version and web version to org.eclipse.wst.common.project.facet.core.xml in .settings dir section of eclipse project

I want to change org.eclipse.wst.common.project.facet.core.xml in .settings

<?xml version="1.0" encoding="UTF-8"?> <faceted-project> <fixed facet="wst.jsdt.web"/> <installed facet="java" version="1.5"/> <installed facet="jst.web" version="2.3"/> <installed facet="wst.jsdt.web" version="1.0"/> </faceted-project> 

I would like to change the java version above to 1.6 and web to 3.0; I can change it manually by opening it in notepad, but after that from eclipse (Kepler), if I try to update the Maven β†’ update project, it says about the error "Unable to change the torch version of the Dynamic Web Module project to 2.3."

How can I make maven know that I want to create a web application with version 3.0 and the specified version of java.

I am creating a maven project (archetype like webapp).

+7
source share
2 answers

Modified web.xml, which should be lower:

 <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0"> <display-name>Archetype Created Web Application</display-name> </web-app> 

and add the following plugins since maven 3 wants to have a compiler

 <plugins> <plugin> <artifactId>maven-compiler-plugin</artifactId> <version>3.1</version> <configuration> <source>1.6</source> <target>1.6</target> </configuration> </plugin> </plugins> 
+18
source

try checking and unchecking the web module, it works with me after i have done this

0
source

Source: https://habr.com/ru/post/955621/


All Articles