Search code examples
eclipsemavenm2eclipsejsf-1.2facet

JSF related Maven Configuration marker in Eclipse


I'm developing a Maven web application which is composed by two war files, using overlaying method. That war files are using JSF 1.2 dependencies. I have no problem building, deploying or running the project, everything works fine, however I get an error marker which is driving me mad:

enter image description here

It looks like Eclipse is not noticing about Dynamic Web Module 2.5 in my wars, even I have this facet installed. Now I'm working with Eclipse Juno, but I experienced this problem with previous releases too. Seems that there's some trouble with JSF 1.2 facet. That's my org.eclipse.wst.common.project.facet.core.xml file:

Main project

<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
  <fixed facet="wst.jsdt.web"/>
  <installed facet="wst.jsdt.web" version="1.0"/>
  <installed facet="java" version="1.6"/>
  <installed facet="jst.web" version="2.5"/>
  <installed facet="jst.jsf" version="1.2"/>
  <installed facet="jst.jaxrs" version="1.0"/>
  <installed facet="jboss.m2" version="1.0"/>
</faceted-project>

War dependency

<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
  <fixed facet="wst.jsdt.web"/>
  <installed facet="java" version="1.6"/>
  <installed facet="jst.web" version="2.5"/>
  <installed facet="wst.jsdt.web" version="1.0"/>
  <installed facet="jst.jaxrs" version="1.0"/>
  <installed facet="jboss.m2" version="1.0"/>
  <installed facet="jst.jsf" version="1.2"/>
</faceted-project>

Did anybody have similar problem? I think facet configuration is properly done, so don't know why I'm getting this error..

UPDATE

It could be a server runtime configuration issue, but if I go to my project's configuration, in Java Build Path, Libraries tab, everything I find is JRE System Library for JavaSE-1.6 and Maven dependencies attached. It seems not to have a server runtime sticked.


Solution

  • The warning there indicate that "some where" in your project, dynamic web module is set to version less than 2.5

    Based on the faces config you provided, it seems you are using DWM 2.5

    <installed facet="jst.web" version="2.5"/>
    

    So some where else in your project, there is reference to lower version.

    • Check Your web-app definitions and schemas, web.xml file. It should be web-app_2_5

    <web-app xsi="http://www.w3.org/2001/XMLSchema-instance"
     xmlns="http://java.sun.com/xml/ns/javaee" 
     web="http://java.sun.com/xml/ns/javaee/webapp_2_5.xsd"
     schemalocation="http://java.sun.com/xml/ns/javaee
     http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
    

    • web.XML doc Type

    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd" >