<?xml version="1.0" encoding="UTF-8"?>
<!--
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You 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 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>
    <groupId>org.apache.myfaces.tobago</groupId>
    <artifactId>tobago-extension</artifactId>
    <version>1.0.25</version>
  </parent>
  <artifactId>tobago-facelets</artifactId>
  <packaging>jar</packaging>
  <name>Tobago Facelets</name>
  <description>Tobago-facelets contains the facelets TagHandler for the tobago components and the facelets variant(tf) for the tobago extension taglib.</description>
  <scm>
    <connection>scm:svn:http://svn.apache.org/repos/asf/myfaces/tobago/tags/tobago-1.0.25/extension/facelets</connection>
    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/myfaces/tobago/tags/tobago-1.0.25/extension/facelets</developerConnection>
    <url>http://svn.apache.org/viewvc/myfaces/tobago/tags/tobago-1.0.25/extension/facelets</url>
  </scm>

  <build>
    
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>2.0.2</version>
        <configuration>
          <source>1.4</source>
          <target>1.4</target>
          <encoding>UTF-8</encoding>
          <showWarnings>true</showWarnings>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>dependency-maven-plugin</artifactId>
        <executions>
          <execution>
          <id>unpack-sources</id>
          <phase>validate</phase>
          <goals><goal>unpack</goal></goals>
          <configuration>
            <artifactItems>
              <artifactItem>
                <groupId>org.apache.myfaces.tobago</groupId>
                <artifactId>tobago-core</artifactId>
                <version>${project.version}</version>
                <type>jar</type>
                <classifier>sources</classifier>
              </artifactItem>
            </artifactItems>
            <outputDirectory>${project.build.directory}/tobago-core-sources</outputDirectory>
          </configuration>
          </execution>
        </executions>
      </plugin>
      <!--<plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>apt-maven-plugin</artifactId>
        <version>1.0-beta-1-SNAPSHOT</version>
        <executions>
          <execution>
            <id>tobago-facelet-taglib</id>
            <goals><goal>execute</goal></goals>
            <phase>compile</phase>
            <configuration>
              <excludes>
                <exclude>org/apache/myfaces/tobago/*</exclude>
              </excludes>
              <includes>
                <include>org/apache/myfaces/tobago/taglib/component/*.java</include>
                <include>org/apache/myfaces/tobago/taglib/decl/*.java</include>
              </includes>
              <aptSourceRoots>
                <aptSourceRoot>${project.build.directory}/tobago-core-sources</aptSourceRoot>
              </aptSourceRoots>
              <targetFiles>
                <targetFile>tobago.taglib.xml</targetFile>
              </targetFiles>
              <resourceTargetPath>META-INF</resourceTargetPath>
              <generated>target/generated-sources</generated>
              <factory>org.apache.myfaces.tobago.apt.FaceletAnnotationProcessorFactory</factory>
              <nocompile>true</nocompile>
              <encoding>UTF-8</encoding>
              <generateToBuildDir>false</generateToBuildDir>
              <force>true</force>
            </configuration>
          </execution>
        </executions>
      </plugin>-->
      <plugin>
        <groupId>org.apache.myfaces.tobago</groupId>
        <artifactId>maven-apt-plugin</artifactId>
        <version>${project.version}</version>
        <executions>
          <execution>
            <id>tobago-facelet-taglib</id>
            <goals><goal>execute</goal></goals>
            <phase>validate</phase>
            <configuration>
              <excludes>
                <exclude>org/apache/myfaces/tobago/*</exclude>
              </excludes>
              <includes>
                <include>org/apache/myfaces/tobago/taglib/component/*</include>
                <include>org/apache/myfaces/tobago/taglib/decl/*</include>
              </includes>
              <aptSourceRoots>
                <aptSourceRoot>${project.build.directory}/tobago-core-sources</aptSourceRoot>
              </aptSourceRoots>
              <targetFiles>
                <targetFile>tobago.taglib.xml</targetFile>
              </targetFiles>
              <resourceTargetPath>META-INF</resourceTargetPath>
              <generated>target/generated-sources</generated>
              <factory>org.apache.myfaces.tobago.apt.FaceletAnnotationProcessorFactory</factory>
              <nocompile>true</nocompile>
              <encoding>UTF-8</encoding>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <repositories>
    <repository>
      <id>java.net</id>
      <url>http://download.java.net/maven/1</url>
      <layout>legacy</layout>
    </repository>
  </repositories>
  <dependencies>
    <dependency>
      <groupId>org.apache.myfaces.tobago</groupId>
      <artifactId>tobago-tool-apt</artifactId>
      <version>${project.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>javax.el</groupId>
      <artifactId>el-api</artifactId>
      <version>1.0</version>
      <!-- in the case of Servlet 2.5 / JSP 2.1
           e. g. Tomcat 6 the scope should be "provided"
      <scope>provided</scope>
      -->
    </dependency>
    <dependency>
      <groupId>com.sun.facelets</groupId>
      <artifactId>jsf-facelets</artifactId>
      <version>${facelets.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.myfaces.tobago</groupId>
      <artifactId>tobago-tool-annotation</artifactId>
      <version>${project.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.myfaces.tobago</groupId>
      <artifactId>tobago-core</artifactId>
      <version>${project.version}</version>
      <exclusions>
        <exclusion>
          <groupId>sun.jdk</groupId>
          <artifactId>tools</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>jsp-api</artifactId>
    </dependency>
<!--
    testing jetty dependency
    <dependency>
       <groupId>org.mortbay.jetty</groupId>
       <artifactId>jsp-2.1</artifactId>
       <version>6.0.1</version>
       <scope>provided</scope>
    </dependency>  
-->

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

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

  <profiles>
    <profile>
      <id>generate-assembly</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-scm-plugin</artifactId>
            <executions>
              <execution>
                <phase>validate</phase>
                <id>getting-scm.revision</id>
                <goals><goal>update</goal></goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>2.2</version>
            <executions>
              <execution>
                <id>attach-javadoc</id>
                <goals><goal>jar</goal></goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-source</id>
                <goals><goal>jar</goal></goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>
