Maven 2 JSF1.1到1.2的迁移

Maven 2 JSF1.1到1.2的迁移,maven-2,jsf,Maven 2,Jsf,我目前正在ApacheTomcat6.0.13上使用JSF1.1,使用maven2 我计划从JSF1.1迁移到1.2。有人能告诉我: -最好使用什么JSF实现 -maven central repository是否提供此实现 -我需要调整代码的哪一部分(我在项目中使用自定义标记,但除此之外,它都是纯JSF) 等等 任何信息都会有帮助。。。塔克斯 [编辑1]: 嗯,这对我不起作用。无法从指定的存储库下载依赖项。可能是因为这是maven 1存储库的链接。我使用以下pom设置: <

我目前正在ApacheTomcat6.0.13上使用JSF1.1,使用maven2

我计划从JSF1.1迁移到1.2。有人能告诉我: -最好使用什么JSF实现 -maven central repository是否提供此实现 -我需要调整代码的哪一部分(我在项目中使用自定义标记,但除此之外,它都是纯JSF)

等等

任何信息都会有帮助。。。塔克斯

[编辑1]:

嗯,这对我不起作用。无法从指定的存储库下载依赖项。可能是因为这是maven 1存储库的链接。我使用以下pom设置:

        <dependency>
            <groupId>javax.faces</groupId>
            <artifactId>jsf-api</artifactId>
            <version>1.2</version>
            <type>jar</type>
            <scope>system</scope>
            <systemPath>${basedir}/src/main/webapp/WEB-INF/lib/jsf-api.jar</systemPath>
        </dependency>
        <dependency>
            <groupId>javax.faces</groupId>
            <artifactId>jsf-impl</artifactId>
            <version>1.2</version>
            <type>jar</type>
            <scope>system</scope>
            <systemPath>${basedir}/src/main/webapp/WEB-INF/lib/jsf-impl.jar</systemPath>
        </dependency>
要修复此错误,需要在web.xml中添加其他侦听器:

    <listener>
        <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
    </listener>

com.sun.faces.config.ConfigureListener

查看以下发行说明,其中包含从1.1到1.2的迁移指南

JSF1.2的maven2工件已经在位于

JSF实现

jsfapi

因此,您不需要在pom.xml或settings.xml中设置任何特殊的存储库

在pom中可以这样定义依赖关系(1.2-b19是撰写本文时的最新版本):


javax.faces
JSFAPI
1.2-b19
javax.faces
jsf impl
1.2-b19
下面是一个完整的pom.xml,它应该包含启动JSF1.2项目的基本依赖项

<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>
    <groupId>com.ecs.sample.jsf</groupId>
    <artifactId>SampleJsfPom</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>war</packaging>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.5</source>
                    <target>1.5</target>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <dependencies>
        <dependency>
            <groupId>javax.faces</groupId>
            <artifactId>jsf-api</artifactId>
            <version>1.2-b19</version>
        </dependency>
        <dependency>
            <groupId>javax.faces</groupId>
            <artifactId>jsf-impl</artifactId>
            <version>1.2-b19</version>
        </dependency>
        <dependency>
            <groupId>com.sun.facelets</groupId>
            <artifactId>jsf-facelets</artifactId>
            <version>1.1.11</version>
        </dependency>
        <dependency>
            <groupId>commons-digester</groupId>
            <artifactId>commons-digester</artifactId>
            <version>1.7</version>
        </dependency>
        <dependency>
            <groupId>commons-beanutils</groupId>
            <artifactId>commons-beanutils</artifactId>
            <version>1.7.0</version>
        </dependency>
        <dependency>
            <groupId>commons-collections</groupId>
            <artifactId>commons-collections</artifactId>
            <version>3.2</version>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>jstl</artifactId>
            <version>1.1.0</version>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
                <version>2.5</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>
</project>

4.0.0
com.ecs.sample.jsf
样本
1.0-快照
战争
org.apache.maven.plugins
maven编译器插件
1.5
1.5
javax.faces
JSFAPI
1.2-b19
javax.faces
jsf impl
1.2-b19
com.sun.facelets
jsf facelets
1.1.11
公地蒸煮器
公地蒸煮器
1.7
公地小海狸
公地小海狸
1.7.0
公地收藏
公地收藏
3.2
javax.servlet
jstl
1.1.0
javax.servlet
servlet api
2.5
假如

Thanx,这正是我一直在搜索的信息。我把编辑放在了我的问题中,因为无法在注释部分格式化代码…Thanx很多。我已经设法工作了。只需要在web.xml中添加两个侦听器,然后就可以正常工作了。听众在更新的问题中。
    <dependency>
        <groupId>javax.faces</groupId>
        <artifactId>jsf-api</artifactId>
        <version>1.2-b19</version>
    </dependency>
    <dependency>
        <groupId>javax.faces</groupId>
        <artifactId>jsf-impl</artifactId>
        <version>1.2-b19</version>
    </dependency>
<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>
    <groupId>com.ecs.sample.jsf</groupId>
    <artifactId>SampleJsfPom</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>war</packaging>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.5</source>
                    <target>1.5</target>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <dependencies>
        <dependency>
            <groupId>javax.faces</groupId>
            <artifactId>jsf-api</artifactId>
            <version>1.2-b19</version>
        </dependency>
        <dependency>
            <groupId>javax.faces</groupId>
            <artifactId>jsf-impl</artifactId>
            <version>1.2-b19</version>
        </dependency>
        <dependency>
            <groupId>com.sun.facelets</groupId>
            <artifactId>jsf-facelets</artifactId>
            <version>1.1.11</version>
        </dependency>
        <dependency>
            <groupId>commons-digester</groupId>
            <artifactId>commons-digester</artifactId>
            <version>1.7</version>
        </dependency>
        <dependency>
            <groupId>commons-beanutils</groupId>
            <artifactId>commons-beanutils</artifactId>
            <version>1.7.0</version>
        </dependency>
        <dependency>
            <groupId>commons-collections</groupId>
            <artifactId>commons-collections</artifactId>
            <version>3.2</version>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>jstl</artifactId>
            <version>1.1.0</version>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
                <version>2.5</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>
</project>