<?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.commons</groupId>
        <artifactId>commons12</artifactId>
        <version>1.0.1</version>
    </parent>
    <artifactId>myfaces-components12</artifactId>
    <packaging>jar</packaging>
    <name>Apache MyFaces Commons Components</name>
    
    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <excludes>
                       <exclude>**/*.vm</exclude>
                </excludes>
            </resource>    
        </resources>
        <plugins>
            <plugin>
                <groupId>org.apache.myfaces.buildtools</groupId>
                <artifactId>myfaces-builder-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>build-metadata</goal>
                            <goal>make-components</goal>
                            <goal>make-tags</goal>
                        </goals>
                        <configuration>
                            <jsfVersion>1.2</jsfVersion>
                        </configuration>
                    </execution>
                    <execution>
                        <id>makefacesconfig</id>
                        <configuration>
                            <templateFile>faces-config12.vm</templateFile>
                            <xmlFile>META-INF/faces-config.xml</xmlFile>
                        </configuration>
                        <goals>
                            <goal>make-config</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>maketld</id>
                        <configuration>
                            <xmlFile>META-INF/mc.tld</xmlFile>
                            <templateFile>tomahawk12.vm</templateFile>
                            <params>
                               <shortname>mc</shortname>
                               <uri>http://myfaces.apache.org/commons/components</uri>
                               <displayname>Myfaces Commons Components Tag Library 1.2.</displayname>
                               <description>MyFaces subproject that contains non rendering components to be used with any JSF implementation.</description>
                            </params>
                        </configuration>
                        <goals>
                            <goal>make-config</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>makemcctaglib</id>
                        <configuration>
                            <xmlFile>META-INF/mc.taglib.xml</xmlFile>
                            <xmlBaseFile>src/main/conf/META-INF/facelets-taglib-base.xml</xmlBaseFile>
                            <templateFile>facelets-taglib.vm</templateFile>
                            <params>
                                <shortname>mc</shortname>
                                <uri>http://myfaces.apache.org/commons/components</uri>
                            </params>
                        </configuration>
                        <goals>
                            <goal>make-config</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <dependencies>

        <dependency>
            <groupId>org.apache.myfaces.core</groupId>
            <artifactId>myfaces-api</artifactId>
        </dependency>
        
        <dependency>
            <groupId>org.apache.myfaces.buildtools</groupId>
            <artifactId>myfaces-builder-annotations</artifactId>
            <scope>provided</scope>
        </dependency>
        
        <dependency>
            <groupId>javax.servlet.jsp</groupId>
            <artifactId>jsp-api</artifactId>
        </dependency>
        
        <dependency>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
        </dependency>
        
        <dependency>
            <groupId>commons-beanutils</groupId>
            <artifactId>commons-beanutils</artifactId>
            <scope>compile</scope>
        </dependency>
        
        <dependency>
            <groupId>org.apache.myfaces.commons</groupId>
            <artifactId>myfaces-commons-utils12</artifactId>
            <version>${project.version}</version>
        </dependency>
        
        <dependency>
            <groupId>poi</groupId>
            <artifactId>poi</artifactId>
        </dependency>
        
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
        </dependency>        
        
        <dependency>
	      <groupId>com.lowagie</groupId>
	      <artifactId>itext</artifactId>
        </dependency>         
        
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
        </dependency>
        
        <dependency>
            <groupId>com.sun.facelets</groupId>
            <artifactId>jsf-facelets</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.myfaces.commons</groupId>
            <artifactId>myfaces-commons-utils12</artifactId>
            <classifier>tests</classifier>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
        
        <dependency>
            <groupId>org.apache.myfaces.test</groupId>
            <artifactId>myfaces-test12</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>joda-time</groupId>
            <artifactId>joda-time</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>cactus</groupId>
            <artifactId>cactus</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>aspectj</groupId>
            <artifactId>aspectjrt</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>easymock</groupId>
            <artifactId>easymock</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>easymock</groupId>
            <artifactId>easymockclassextension</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>maven-taglib</groupId>
            <artifactId>maven-taglib-plugin</artifactId>
            <scope>test</scope>
        </dependency>

    </dependencies>

    <reporting>
        <plugins>
            <plugin>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.4</version>
            </plugin>
            <plugin>
                <artifactId>maven-jxr-plugin</artifactId>
                <version>2.1</version>
            </plugin>
            <plugin>
                <artifactId>maven-surefire-report-plugin</artifactId>
                <version>2.4.3</version>
            </plugin>
        </plugins>
    </reporting>

    <profiles>
        <profile>
            <id>generate-site</id>
            <build>
                <plugins>
                    <plugin>
                        <!-- Generate content for custom tagdoc report -->
                        <groupId>org.apache.myfaces.buildtools</groupId>
                        <artifactId>myfaces-builder-plugin</artifactId>
                        <configuration>
                            <taglibs>
                                <mcc>http://myfaces.apache.org/commons/components</mcc>
                            </taglibs>
                        </configuration>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>tagdoc-content</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
            <reporting>
                <plugins>
                    <plugin>
                        <groupId>net.sourceforge.maven-taglib</groupId>
                        <artifactId>maven-taglib-plugin</artifactId>
                        <configuration>
                            <taglib.src.dir>${project.build.directory}/generated-resources/myfaces-builder-plugin/META-INF</taglib.src.dir>
                            <tldDocDir>${project.build.directory}/site/tlddoc</tldDocDir>
                        </configuration>
                    </plugin>
                    <plugin>
                        <!-- which goal is run here? -->
                        <groupId>org.apache.myfaces.buildtools</groupId>
                        <artifactId>myfaces-builder-plugin</artifactId>
                        <configuration>
                            <taglibs>
                                <mcc>http://myfaces.apache.org/commons/components</mcc>
                            </taglibs>
                        </configuration>
                    </plugin>
                </plugins>
            </reporting>
        </profile>
        <profile>
            <!--
                - Build and install into the repository some additional artifacts that we don't
                - want to build during normal development because they take too long.
            -->
            <id>generate-assembly</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <!-- Install in the repository a "-javadoc.jar" file -->
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.4</version>
                        <executions>
                            <execution>
                                <id>attach-javadoc</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <!-- Install in the repository a "-tlddoc.jar" file -->
                        <groupId>net.sourceforge.maven-taglib</groupId>
                        <artifactId>maven-taglib-plugin</artifactId>
                        <configuration>
                            <taglib.src.dir>${project.build.directory}/generated-resources/myfaces-builder-plugin/META-INF</taglib.src.dir>
                            <tldDocDir>${basedir}/target/tlddoc</tldDocDir>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-javadoc</id>
                                <goals>
                                    <goal>taglibdocjar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <!-- Install in the repository a "-sources.jar" file -->
                        <artifactId>maven-source-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-source</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
