wildfly8.1上eclipse中的JSF2.2
我有一个从一些maven原型创建的项目,不记得是哪一个。我使用maven和Eclipse开普勒 该项目部署在Wildfly8.1服务器上 在facests项目中,我有JSF2.0,当我尝试将facet更改为JSF2.2时,我得到了massege Cann not change版本的facet JavaServerFaces 我是否必须更改maven pom文件中的某些内容 这是我的maven pom:wildfly8.1上eclipse中的JSF2.2,eclipse,maven,jsf-2,Eclipse,Maven,Jsf 2,我有一个从一些maven原型创建的项目,不记得是哪一个。我使用maven和Eclipse开普勒 该项目部署在Wildfly8.1服务器上 在facests项目中,我有JSF2.0,当我尝试将facet更改为JSF2.2时,我得到了massege Cann not change版本的facet JavaServerFaces 我是否必须更改maven pom文件中的某些内容 这是我的maven pom: <?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>ypay</artifactId>
<groupId>si.arctur</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<artifactId>ypay-web</artifactId>
<packaging>war</packaging>
<name>ypay Web module</name>
<dependencies>
<dependency>
<groupId>org.jboss.spec.javax.ejb</groupId>
<artifactId>jboss-ejb-api_3.1_spec</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.primefaces.extensions</groupId>
<artifactId>primefaces-extensions</artifactId>
<version>1.2.1</version>
</dependency>
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>4.0</version>
</dependency>
<!-- Dependency on the EJB module so we can use it's services if needed -->
<dependency>
<groupId>si.arctur</groupId>
<artifactId>ypay-ejb</artifactId>
<type>ejb</type>
<scope>provided</scope>
</dependency>
<!-- Import the JAX-RS API, we use provided scope as the API is included
in JBoss AS 7 -->
<dependency>
<groupId>org.jboss.spec.javax.ws.rs</groupId>
<artifactId>jboss-jaxrs-api_1.1_spec</artifactId>
<scope>provided</scope>
</dependency>
<!-- Import the CDI API, we use provided scope as the API is included
in JBoss AS 7 -->
<dependency>
<groupId>javax.enterprise</groupId>
<artifactId>cdi-api</artifactId>
<scope>provided</scope>
</dependency>
<!-- Import the JPA API, we use provided scope as the API is included
in JBoss AS 7 -->
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.0-api</artifactId>
<scope>provided</scope>
</dependency>
<!-- Import the JSF API, we use provided scope as the API is included
in JBoss AS 7 -->
<dependency>
<groupId>org.jboss.spec.javax.faces</groupId>
<artifactId>jboss-jsf-api_2.2_spec</artifactId>
<version>2.2.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.16</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.omnifaces</groupId>
<artifactId>omnifaces</artifactId>
<version>1.7</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<configuration>
<!-- Java EE 6 doesn't require web.xml, Maven needs to catch
up! -->
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
</plugins>
</build>
</project>
您没有提到您使用的Eclipse插件。假设您拥有当前版本的JBoss工具,那么在首次将Maven项目导入Eclipse时,应根据POM依赖项正确设置facet 在POM中,Java EE 6和7的依赖性混合在一起,这可能是问题的根源 尝试删除javax:javaeeapi:6.0依赖项—在POM中有独立的JavaEE7API—然后在Eclipse中运行Maven | Update项目
如果没有帮助,请从工作区中删除项目,从文件system.project.classpath中删除所有Eclipse元数据,。设置并重新导入项目。可能是重复的或类似的