[英]JSF Maven Mojarra implementation
I try to create simple project with JSF, Eclipse and Maven.我尝试使用 JSF、Eclipse 和 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.供 Maven jsf-api 下载。 But if I understand correct I also need jsf-impl?
但如果我理解正确,我还需要 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?
我在哪里可以找到 jsf-impl? Thanks.
谢谢。
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.在我发布上一个问题的同一个网站上,说明解释说您不需要 jsf-impl,因为您的应用服务器应该提供它。 The site goes on to mention how to get it from maven if you really need it.
该网站继续提到如果您真的需要它,如何从 maven 获取它。
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
<version>2.1.0</version>
If you need the Mojarra implementation, this is available in the Java.net repository.如果您需要 Mojarra 实现,可以在 Java.net 存储库中找到。 You'll need to add the following entries in your POM:
您需要在 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.
但是您可以根据自己的喜好选择一个好的 maven 存储库(maven central)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.