Monday, July 14, 2014

Eclipse: How to change the version of project facet Dynamic Web Module

I sometimes run into a maven problem while using eclipse, when trying to change the version number of my project facet Dynamic Web Module. There are two things you can do to solve this issue:
  • Check your web.xml for correct attributes:
    <?xml version="1.0" encoding="ASCII"?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xmlns="http://java.sun.com/xml/ns/javaee"
                   xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
                   xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
                   version="3.0">

    </web-app>
  • Edit the org.exlipse.wst.common.project.facet.core.xml, located in the .settings folder of your eclipse maven project. Change the version number of the following tag to the one you desire for your Dynamic Web Module:
    <installed facet="jst.web" version="3.0"/>
Dont forget do execute a Maven -> Update Project after you are finished.

No comments:

Post a Comment