<?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.0.Final</version>
        <relativePath>../../parent/pom.xml</relativePath>
    </parent>

    <artifactId>richfaces-components-api</artifactId>
    <packaging>jar</packaging>
    <name>Richfaces UI Components API</name>

    <dependencies>
        <dependency>
            <groupId>org.richfaces.ui.common</groupId>
            <artifactId>richfaces-ui-common-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.richfaces.ui.core</groupId>
            <artifactId>richfaces-ui-core-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.richfaces.ui.iteration</groupId>
            <artifactId>richfaces-ui-iteration-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.richfaces.ui.output</groupId>
            <artifactId>richfaces-ui-output-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.richfaces.ui.input</groupId>
            <artifactId>richfaces-ui-input-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.richfaces.ui.dnd</groupId>
            <artifactId>richfaces-ui-dnd-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.richfaces.ui.validator</groupId>
            <artifactId>richfaces-ui-validator-api</artifactId>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <build>
        <resources>
            <resource>
                <directory>src/main/assembly</directory>
                <targetPath>${project.build.directory}/assembly</targetPath>
                <filtering>false</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 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>
                                org.richfaces.ui.core,org.richfaces.ui.common,org.richfaces.ui.misc,org.richfaces.ui.iteration,org.richfaces.ui.output,org.richfaces.ui.input,org.richfaces.ui.dnd,org.richfaces.ui.validator
                            </includeGroupIds>
                            <useSubDirectoryPerArtifact>false</useSubDirectoryPerArtifact>
                            <excludeTransitive>true</excludeTransitive>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <executions>
                    <execution>
                        <id>assembly</id>
                        <phase>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>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <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>
                </plugins>
            </build>
        </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>
