<?xml version="1.0" encoding="UTF-8"?>
<!--
    JBoss, Home of Professional Open Source Copyright 2010, Red Hat,
    Inc. and individual contributors by the @authors tag. See the
    copyright.txt in the distribution for a full listing of
    individual contributors. This is free software; you can
    redistribute it and/or modify it under the terms of the GNU
    Lesser General Public License as published by the Free Software
    Foundation; either version 2.1 of the License, or (at your
    option) any later version. This software is distributed in the
    hope that it will be useful, but WITHOUT ANY WARRANTY; without
    even the implied warranty of MERCHANTABILITY or FITNESS FOR A
    PARTICULAR PURPOSE. See the GNU Lesser General Public License
    for more details. You should have received a copy of the GNU
    Lesser General Public License along with this software; if not,
    write to the Free Software Foundation, Inc., 51 Franklin St,
    Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF site:
    http://www.fsf.org.
-->
<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/xsd/maven-4.0.0.xsd">

    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.richfaces.ui</groupId>
        <artifactId>richfaces-ui-parent</artifactId>
        <version>4.3.5.Final</version>
        <relativePath>../../parent/pom.xml</relativePath>
    </parent>

    <artifactId>richfaces-components-ui</artifactId>
    <packaging>jar</packaging>
    <name>RichFaces UI Components UI</name>

    <properties>
        <assembly.projects.group>org.richfaces.ui</assembly.projects.group>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.richfaces.ui</groupId>
            <artifactId>richfaces-components-api</artifactId>
            <scope>compile</scope>
        </dependency>
    
        <!-- artifacts for aggregation -->
        <dependency>
            <groupId>org.richfaces.ui.common</groupId>
            <artifactId>richfaces-ui-common-ui</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.richfaces.ui.core</groupId>
            <artifactId>richfaces-ui-core-ui</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.richfaces.ui.misc</groupId>
            <artifactId>richfaces-ui-misc-ui</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.richfaces.ui.iteration</groupId>
            <artifactId>richfaces-ui-iteration-ui</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.richfaces.ui.output</groupId>
            <artifactId>richfaces-ui-output-ui</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.richfaces.ui.input</groupId>
            <artifactId>richfaces-ui-input-ui</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.richfaces.ui.dnd</groupId>
            <artifactId>richfaces-ui-dnd-ui</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.richfaces.ui.validator</groupId>
            <artifactId>richfaces-ui-validator-ui</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.richfaces.ui</groupId>
            <artifactId>static-resources</artifactId>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <build>
        <resources>
            <resource>
                <directory>src/main/assembly</directory>
                <targetPath>${project.build.directory}/assembly</targetPath>
                <filtering>true</filtering>
            </resource>
        </resources>
        <plugins>
            <!-- disable default jar packaging -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <executions>
                    <execution>
                        <id>default-compile</id>
                        <phase>none</phase>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <executions>
                    <execution>
                        <id>default-jar</id>
                        <phase>none</phase>
                    </execution>
                </executions>
            </plugin>
            <!-- disable default sources packaging -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <phase>none</phase>
                    </execution>
                </executions>
            </plugin>
            <plugin>
            <!-- unpack necessary dependencies for collecting sources, jsdoc and javadocs -->
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>deps</id>
                        <phase>process-sources</phase>
                        <goals>
                            <goal>unpack-dependencies</goal>
                        </goals>
                        <configuration>
                            <classifier>sources</classifier>
                            <includeGroupIds>
                                ${assembly.projects.group}.core,${assembly.projects.group}.common,${assembly.projects.group}.misc,${assembly.projects.group}.iteration,${assembly.projects.group}.output,${assembly.projects.group}.input,${assembly.projects.group}.dnd,${assembly.projects.group}.validator
                            </includeGroupIds>
                            <useSubDirectoryPerArtifact>false</useSubDirectoryPerArtifact>
                            <excludeTransitive>true</excludeTransitive>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <executions>
                    <execution>
                        <id>assembly-jar</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <appendAssemblyId>false</appendAssemblyId>
                            <descriptors>
                                <descriptor>${project.build.directory}/assembly/assembler-jar.xml</descriptor>
                            </descriptors>
                        </configuration>
                    </execution>
                    <execution>
                        <id>assembly-sources</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <descriptors>
                                <descriptor>${project.build.directory}/assembly/assembler-sources.xml</descriptor>
                            </descriptors>
                        </configuration>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>org.richfaces.build.resources</groupId>
                        <artifactId>faces-shade-transformers</artifactId>
                        <version>${version.shade-transformers}</version>
                    </dependency>
                </dependencies>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <!-- unpack necessary dependencies for collecting jsdoc and javadocs -->
                        <artifactId>maven-dependency-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>vdldeps</id>
                                <phase>process-sources</phase>
                                <goals>
                                    <goal>unpack</goal>
                                </goals>
                                <configuration>
                                    <artifactItems>
                                        <artifactItem>
                                            <groupId>org.richfaces.build.resources</groupId>
                                            <artifactId>faces-vdl-documentation</artifactId>
                                            <version>${faces-vdl-documentation.version}</version>
                                            <outputDirectory>${project.build.directory}/resources/</outputDirectory>
                                            <includes>**/*.xsl</includes>
                                        </artifactItem>
                                        <artifactItem>
                                            <groupId>org.richfaces.build.resources</groupId>
                                            <artifactId>faces-vdl-documentation</artifactId>
                                            <outputDirectory>${project.build.directory}/vdldoc/</outputDirectory>
                                            <includes>**/*.css</includes>
                                        </artifactItem>
                                    </artifactItems>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <!-- Generate a single javadoc jar from all of the sources 
                             expanded in /target/dependency directory -->
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <configuration>
                            <sourcepath>${basedir}/target/dependency</sourcepath>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>xml-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>transform</goal>
                                </goals>
                                <phase>package</phase>
                            </execution>
                        </executions>
                        <configuration>
                            <transformationSets>
                                <transformationSet>
                                    <dir>${basedir}/src/main/properties</dir>
                                    <stylesheet>${project.build.directory}/resources/xsl/common.xsl</stylesheet>
                                    <parameters>
                                        <parameter>
                                            <name>output-dir</name>
                                            <value>${project.build.directory}/vdldoc/</value>
                                        </parameter>
                                    </parameters>
                                    <fileMappers>
                                        <fileMapper implementation="org.codehaus.plexus.components.io.filemappers.RegExpFileMapper">
                                            <pattern>^(.*)\.(.*)$</pattern>
                                            <replacement>all.txt</replacement>
                                        </fileMapper>
                                    </fileMappers>
                                </transformationSet>
                            </transformationSets>
                        </configuration>
                        <dependencies>
                            <dependency>
                                <groupId>net.sf.saxon</groupId>
                                <artifactId>saxon</artifactId>
                                <version>${version.saxon}</version>
                            </dependency>
                        </dependencies>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-assembly-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>make-assembly</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>single</goal>
                                </goals>
                                <configuration>
                                    <descriptors>
                                        <descriptor>${project.build.directory}/assembly/assembler-vdldoc.xml</descriptor>
                                    </descriptors>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>

            </build>
            <dependencies>
                <dependency>
                    <groupId>org.richfaces.build.resources</groupId>
                    <artifactId>faces-vdl-documentation</artifactId>
                    <scope>provided</scope>
                </dependency>
            </dependencies>
        </profile>
    </profiles>

    <scm>
        <connection>scm:git:git://github.com/richfaces/components.git</connection>
        <developerConnection>scm:git:git@github.com:richfaces/components.git</developerConnection>
        <url>https://github.com/richfaces/components</url>
    </scm>

</project>
