<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">

	<parent>
		<artifactId>samples</artifactId>
		<groupId>org.richfaces</groupId>
		<version>3.2.2.CR2</version>
	</parent>
  
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.richfaces.samples</groupId>
  <artifactId>richfaces-demo</artifactId>
  <packaging>war</packaging>
  <name>richfaces-demo Maven Webapp</name>

  <repositories>
    <repository>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>repository.jboss.com</id>
      <name>Jboss Repository for Maven</name>
      <url>
        http://repository.jboss.com/maven2/
      </url>
    </repository>
  </repositories>
  
  <build>
    <finalName>richfaces-demo</finalName>
    <plugins>
      <plugin>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>unpack</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>unpack</goal>
            </goals>
            <configuration>
              <artifactItems>
                <artifactItem>
                  <groupId>org.richfaces.ui</groupId>
                  <artifactId>richfaces-ui</artifactId>
                  <version>${project.version}</version>
                </artifactItem>
              </artifactItems>
              <outputDirectory>${project.build.directory}/richfaces</outputDirectory>
              <overWriteReleases>false</overWriteReleases>
              <overWriteSnapshots>true</overWriteSnapshots>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>exec-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>tlddoc</id>
            <phase>process-resources</phase>
            <goals>
              <goal>java</goal>
            </goals>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>taglibrarydoc</groupId>
            <artifactId>tlddoc</artifactId>
            <version>1.3</version>
          </dependency>
        </dependencies>
        <configuration>
          <includeProjectDependencies>false</includeProjectDependencies>
          <includePluginDependencies>true</includePluginDependencies>
          <executableDependency>
            <groupId>taglibrarydoc</groupId>
            <artifactId>tlddoc</artifactId>
          </executableDependency>
          <mainClass>com.sun.tlddoc.TLDDoc</mainClass>
          <arguments>
            <argument>-d</argument>
            <argument>${project.build.directory}/${project.build.finalName}/WEB-INF/tlddoc</argument>
            <argument>-xslt</argument>
            <argument>${basedir}/src/main/xslt/tlddoc</argument>
            <argument>${project.build.directory}/richfaces/META-INF/ajax4jsf.tld</argument>
            <argument>${project.build.directory}/richfaces/META-INF/rich.tld</argument>
          </arguments>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>1.5</source>
          <target>1.5</target>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-war-plugin</artifactId>
        <configuration>
          <webResources>
            <resource>
              <directory>${basedir}/src/main/java</directory>
              <targetPath>/WEB-INF/src</targetPath>
            </resource>
          </webResources>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-war-plugin</artifactId>
            <executions>
              <execution>
                <id>jee5</id>
                <phase>package</phase>
                <goals>
                  <goal>war</goal>
                </goals>
                <configuration>
                  <webappDirectory>${project.build.directory}/${project.build.finalName}-jee5</webappDirectory>
                  <classifier>jee5</classifier>
                  <warSourceExcludes>WEB-INF/lib/jsf-api*,WEB-INF/lib/jsf-impl*,WEB-INF/lib/el-*</warSourceExcludes>
                </configuration>
              </execution>
              <execution>
                <id>tomcat6</id>
                <phase>package</phase>
                <goals>
                  <goal>war</goal>
                </goals>
                <configuration>
                  <webappDirectory>${project.build.directory}/${project.build.finalName}-tomcat6</webappDirectory>
                  <classifier>tomcat6</classifier>
                  <warSourceExcludes>WEB-INF/lib/el-*</warSourceExcludes>
                </configuration>
              </execution>
            </executions>
            <configuration>
              <webResources>
                <resource>
                  <directory>${basedir}/src/main/java</directory>
                  <targetPath>/WEB-INF/src</targetPath>
                </resource>
              </webResources>
            </configuration>
          </plugin>
        </plugins>
      </build>
      <dependencies>
        <dependency>
          <groupId>javax.el</groupId>
          <artifactId>el-api</artifactId>
          <version>1.0</version>
        </dependency>
        <dependency>
          <groupId>el-impl</groupId>
          <artifactId>el-impl</artifactId>
          <version>1.0</version>
        </dependency>
        <dependency>
          <groupId>javax.servlet</groupId>
          <artifactId>servlet-api</artifactId>
          <version>2.4</version>
          <scope>provided</scope>
        </dependency>
        <dependency>
          <groupId>javax.servlet.jsp</groupId>
          <artifactId>jsp-api</artifactId>
          <version>2.0</version>
          <scope>provided</scope>
        </dependency>
        <dependency>
          <groupId>javax.faces</groupId>
          <artifactId>jsf-api</artifactId>
          <version>1.2_09</version>
        </dependency>
        <dependency>
          <groupId>javax.faces</groupId>
          <artifactId>jsf-impl</artifactId>
          <version>1.2_09</version>
          <scope>runtime</scope>
        </dependency>
      </dependencies>
    </profile>
  </profiles>
  <dependencies>
    <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-validator</artifactId>
      <version>3.1.0.CR1</version>
    </dependency>
    <dependency>
	<groupId>org.slf4j</groupId> 
	<artifactId>slf4j-simple</artifactId> 
	<version>1.4.2</version> 
    </dependency>
    <dependency>
      <groupId>org.richfaces.samples</groupId>
      <artifactId>laguna</artifactId>
      <version>3.2.2.CR2</version>
    </dependency>
    <dependency>
      <groupId>org.richfaces.samples</groupId>
      <artifactId>glassX</artifactId>
      <version>3.2.2.CR2</version>
    </dependency>
    <dependency>
      <groupId>org.richfaces.samples</groupId>
      <artifactId>darkX</artifactId>
      <version>3.2.2.CR2</version>
    </dependency>
    <dependency>
      <groupId>org.richfaces.ui</groupId>
      <artifactId>richfaces-ui</artifactId>
      <version>3.2.2.CR2</version>
    </dependency>
    <dependency>
      <groupId>com.uwyn</groupId>
      <artifactId>jhighlight</artifactId>
      <version>1.0</version>
    </dependency>
    <dependency>
      <groupId>xerces</groupId>
      <artifactId>xercesImpl</artifactId>
      <version>2.8.1</version>
    </dependency>
    <dependency>
      <groupId>com.sun.facelets</groupId>
      <artifactId>jsf-facelets</artifactId>
      <version>1.1.14</version>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>jstl</artifactId>
      <version>1.0</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>nekohtml</groupId>
      <artifactId>nekohtml</artifactId>
      <version>0.9.5</version>
      <scope>runtime</scope>
      <exclusions>
        <exclusion>
          <artifactId>xerces</artifactId>
          <groupId>xerces</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>servlet-api</artifactId>
      <version>2.5</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>javax.servlet.jsp</groupId>
      <artifactId>jsp-api</artifactId>
      <version>2.1</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>javax.faces</groupId>
      <artifactId>jsf-api</artifactId>
      <version>1.2_09</version>
    </dependency>
    <dependency>
      <groupId>javax.faces</groupId>
      <artifactId>jsf-impl</artifactId>
      <version>1.2_09</version>
      <scope>runtime</scope>
    </dependency>
  </dependencies>
</project>
