Here is a modified version of the Trinidad Demo pom.xml file, which includes Jetty 6 support.

After you updated your pom.xml, just run

mvn clean jetty:run

and the demo is accessable at http://localhost:8080/trinidad-demo/faces/index.jspx

Here is the file:

<?xml version="1.0" encoding="UTF-8"?>
<!--
  Copyright 2006 The Apache Software Foundation.

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<project>
  <parent>
    <groupId>org.apache.myfaces.trinidad</groupId>
    <artifactId>trinidad</artifactId>
    <version>incubator-m1-SNAPSHOT</version>
  </parent>

  <modelVersion>4.0.0</modelVersion>

  <name>Apache Trinidad Demo</name>
  <description>Apache Trinidad Demo</description>

  <artifactId>trinidad-demo</artifactId>
  <packaging>war</packaging>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.myfaces.trinidadbuild</groupId>
        <artifactId>maven-jdev-plugin</artifactId>
        <configuration>
          <libraries>
            <library>JSP Runtime</library>
          </libraries>
        </configuration>
      </plugin>

          <plugin>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>maven-jetty-plugin</artifactId>
            <configuration>
              <scanIntervalSeconds>10</scanIntervalSeconds>
            </configuration>
          </plugin>

    </plugins>
  </build>

        <pluginRepositories>
      <!-- Repository to get the jetty plugin -->
        <pluginRepository>
          <id>mortbay-repo</id>
          <name>mortbay-repo</name>
          <url>http://www.mortbay.org/maven2/snapshot</url>
        </pluginRepository>
      </pluginRepositories>


  <dependencies>

  <!-- jetty -->
                  <dependency>
                    <groupId>javax.servlet</groupId>
                    <artifactId>jsp-api</artifactId>
                    <version>2.0</version>
                    <scope>compile</scope>
                </dependency>
                <dependency>
                    <groupId>tomcat</groupId>
                    <artifactId>jasper-compiler</artifactId>
                    <version>5.5.9</version>
                    <scope>compile</scope>
                </dependency>
                <dependency>
                    <groupId>tomcat</groupId>
                    <artifactId>jasper-runtime</artifactId>
                    <version>5.5.9</version>
                    <scope>compile</scope>
                </dependency>
                <dependency>
                    <groupId>tomcat</groupId>
                    <artifactId>jasper-compiler-jdt</artifactId>
                    <version>5.5.9</version>
                    <scope>compile</scope>
                </dependency>


    <dependency>
      <groupId>${pom.groupId}</groupId>
      <artifactId>trinidad-api</artifactId>
      <version>${pom.version}</version>
    </dependency>

    <dependency>
      <groupId>${pom.groupId}</groupId>
      <artifactId>trinidad-impl</artifactId>
      <version>${pom.version}</version>
    </dependency>

    <dependency>
      <groupId>javax.mail</groupId>
      <artifactId>mail</artifactId>
      <version>1.4</version>
    </dependency>
    
    <dependency>
      <groupId>javax.activation</groupId>
      <artifactId>activation</artifactId>
      <version>1.1</version>
    </dependency>

    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>jstl</artifactId>
      <version>1.1.2</version>
      <scope>runtime</scope>
    </dependency>

<!-- Dependencies pulled in via myfaces/ri pom
    <dependency>
      <groupId>commons-beanutils</groupId>
      <artifactId>commons-beanutils</artifactId>
      <version>1.6</version>
      <scope>runtime</scope>
    </dependency>

    <dependency>
      <groupId>commons-digester</groupId>
      <artifactId>commons-digester</artifactId>
      <version>1.5</version>
      <scope>runtime</scope>
    </dependency>

    <dependency>
      <groupId>commons-logging</groupId>
      <artifactId>commons-logging</artifactId>
      <version>1.0.4</version>
      <scope>runtime</scope>
    </dependency>
    
    <dependency>
      <groupId>commons-collections</groupId>
      <artifactId>commons-collections</artifactId>
      <version>2.1</version>
      <scope>runtime</scope>
    </dependency>
-->

    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>servlet-api</artifactId>
    </dependency>

    <dependency>
      <groupId>javax.servlet.jsp</groupId>
      <artifactId>jsp-api</artifactId>
    </dependency>
  </dependencies>

  <profiles>
    <!-- By default the war examples use myfaces! :) -->
    <profile>
      <id>myfaces</id>
      <activation>
        <property>
          <name>!jsf</name>
        </property>
      </activation>
      <dependencies>

        <dependency>
          <groupId>org.apache.myfaces.core</groupId>
          <artifactId>myfaces-api</artifactId>
          <scope>compile</scope>
        </dependency>

        <dependency>
          <groupId>org.apache.myfaces.core</groupId>
          <artifactId>myfaces-impl</artifactId>
          <scope>runtime</scope>
        </dependency>
      </dependencies>
      
      <properties>
        <jsf_implementation>MyFaces</jsf_implementation>
      </properties>
    </profile>

    <!-- To use the examples using the Sun's JSF Reference Implementation: -Djsf=ri -->
    <profile>
      <id>jsfri</id>
      <activation>
        <property>
          <name>jsf</name>
          <value>ri</value>
        </property>
      </activation>
      <dependencies>
        <dependency>
          <groupId>javax.faces</groupId>
          <artifactId>jsf-api</artifactId>
          <version>1.1_02</version>
        </dependency>
        <dependency>
          <groupId>javax.faces</groupId>
          <artifactId>jsf-impl</artifactId>
          <version>1.1_02</version>
          <scope>runtime</scope>
        </dependency>

        <dependency>
          <groupId>jstl</groupId>
          <artifactId>jstl</artifactId>
          <version>1.1.0</version>
          <scope>compile</scope>
        </dependency>

        <dependency>
          <groupId>commons-digester</groupId>
          <artifactId>commons-digester</artifactId>
          <version>1.5</version>
          <scope>runtime</scope>
        </dependency>

      </dependencies>

      <repositories>
        <repository>
          <id>java.net</id>
          <name>java.net Maven 1 Repository</name>
          <url>https://maven-repository.dev.java.net/nonav/repository</url>
          <layout>legacy</layout>
        </repository>
      </repositories>

      <properties>
        <jsf_implementation>JSF-RI</jsf_implementation>
      </properties>
    </profile>
  </profiles>

</project>

Jetty_and_Trinidad_Demo (last edited 2009-09-20 23:01:26 by localhost)