JSF Facet library dependency when using Maven

If I create a Maven module project and choose the maven-archetype-webapp archetype, I can then easily add a faces-config.xml file (highlight the webapp folder, ALT+Insert, XML Configuration File > Faces Config).  Once I do that, IntelliJ detects I'm trying to use JSF and suggests adding the JSF facet.  So far so good. I click okay.  Next I update my pom.xml to include the javax.faces dependency by adding this:


        <dependency>
            <groupId>javax.faces</groupId>
            <artifactId>javax.faces-api</artifactId>
            <version>2.2</version>
            <scope>provided</scope>
        </dependency>


I run maven compile to make sure the jar is downloaded to my local M2 repo.  I use provided scope because I'm deploying to GlassFish.  My question is this, if I go into Project Structure > Facets > JSF, there is a warning at the bottom of the window "Jsf library not found in the module dependencies list."  If I click "Fix", my only real option is to download javax.faces-2.2.1.jar to my project's lib folder.  I don't want to do that because I'm letting Maven handle my dependencies.  So basically I'm just wondering if it is okay to ignore that warning?  If not, what am I overlooking?  I do see that JSF development seems to work just fine.  I can write backing beans, XHTML pages to interact with them, etc. and everything seems to work just fine.  I'm just concerned about that lib warning on the facets page (screenshot attached).



Thanks.



     



Attachment(s):
snapshot2.png

Please sign in to leave a comment.