Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JSF Maven Mojarra implementation

I try to create simple project with JSF, Eclipse and Maven. I used

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

for download by Maven jsf-api. But if I understand correct I also need jsf-impl? When I try add like:

<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-impl</artifactId>
<version>2.1</version>
<scope>provided</scope>
</dependency>

nothing find. Where I can find jsf-impl? Thanks.

like image 412
user710818 Avatar asked Jan 19 '23 03:01

user710818


2 Answers

On the same website that I posted on your last question, the instructions explain that you shouldn't need jsf-impl, because your app server should provide it. The site goes on to mention how to get it from maven if you really need it.

<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
<version>2.1.0</version>
like image 198
Jon7 Avatar answered Jan 21 '23 18:01

Jon7


If you need the Mojarra implementation, this is available in the Java.net repository. You'll need to add the following entries in your POM:

<project>
    ...
    <dependencies>
    ...
        <dependency>
            <groupId>com.sun.faces</groupId>
            <artifactId>jsf-impl</artifactId>
            <version>2.1.0</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>
    ...
    <repositories>
    ...
        <repository>
            <id>Java.net</id>
            <url>http://download.java.net/maven/2</url>
        </repository>
    </repositories>
    ...
</project>

Update: the repository mentioned here is not available anymore. But you can pick a good maven repository (maven central) of your liking.

like image 23
Vineet Reynolds Avatar answered Jan 21 '23 19:01

Vineet Reynolds