<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2018 Red Hat, Inc.
  ~
  ~ Licensed 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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.jboss.migration</groupId>
        <artifactId>jboss-server-migration-parent</artifactId>
        <version>1.3.0.Beta</version>
        <relativePath>../../../pom.xml</relativePath>
    </parent>

    <artifactId>jboss-server-migration-eap7.2-galleon-pack</artifactId>

    <name>JBoss Server Migration: JBoss EAP 7.2 Galleon Pack</name>
    <packaging>pom</packaging>

    <properties>
        <license.directory>${project.build.directory}/resources/content/docs/licenses</license.directory>
        <feature-pack.resources.directory>${basedir}/src/main/resources</feature-pack.resources.directory>
        <feature-pack.license.directory>${basedir}/src/license</feature-pack.license.directory>
    </properties>

    <dependencies>

        <!-- feature pack dependencies -->

        <dependency>
            <groupId>org.wildfly.core</groupId>
            <artifactId>wildfly-core-galleon-pack</artifactId>
            <type>zip</type>
            <exclusions>
                <exclusion>
                    <groupId>*</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <!-- module and copy artifact dependencies -->

        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>jboss-server-migration-core</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>*</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>jboss-server-migration-cli</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>*</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>jboss-server-migration-eap6.4</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>*</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>jboss-server-migration-eap6.4-to-eap7.0</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>*</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>jboss-server-migration-eap6.4-to-eap7.2</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>*</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>jboss-server-migration-eap7.0</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>*</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>jboss-server-migration-eap7.0-to-eap7.2</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>*</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>jboss-server-migration-eap7.1</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>*</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>jboss-server-migration-eap7.1-to-eap7.2</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>*</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>jboss-server-migration-eap7.2</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>*</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>jboss-server-migration-wildfly8.2</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>*</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>jboss-server-migration-wildfly8.2-to-eap7.2</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>*</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>jboss-server-migration-wildfly9.0</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>*</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>jboss-server-migration-wildfly9.0-to-eap7.2</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>*</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>jboss-server-migration-wildfly10.0</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>*</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>jboss-server-migration-wildfly10.0-to-eap7.2</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>*</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>jboss-server-migration-wildfly10.1</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>*</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>jboss-server-migration-wildfly10.1-to-eap7.2</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>*</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>jboss-server-migration-wildfly11.0</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>*</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>jboss-server-migration-wildfly11.0-to-eap7.2</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>*</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>jboss-server-migration-wildfly12.0</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>*</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>jboss-server-migration-wildfly12.0-to-eap7.2</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>*</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>jboss-server-migration-wildfly13.0-server</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>*</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-resources</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${basedir}/target/resources</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>${basedir}/src/main/resources</directory>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.wildfly.galleon-plugins</groupId>
                <artifactId>wildfly-galleon-maven-plugins</artifactId>
                <executions>
                    <execution>
                        <id>feature-pack-build</id>
                        <goals>
                            <goal>build-feature-pack</goal>
                        </goals>
                        <phase>prepare-package</phase>
                        <configuration>
                            <release-name>JBoss Server Migration</release-name>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>update-licenses-xml</id>
            <activation>
                <property>
                    <name>!skip-update-licenses-xml</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.wildfly.maven.plugins</groupId>
                        <artifactId>licenses-plugin</artifactId>
                        <inherited>false</inherited>
                        <executions>
                            <execution>
                                <id>update-licenses-xml-package</id>
                                <goals>
                                    <goal>insert-versions</goal>
                                </goals>
                                <phase>process-resources</phase>
                                <configuration>
                                    <sortByGroupIdAndArtifactId>true</sortByGroupIdAndArtifactId>
                                    <licensesConfigFile>${feature-pack.license.directory}/migration-feature-pack-licenses.xml</licensesConfigFile>
                                    <licensesOutputFile>${license.directory}/migration-feature-pack-licenses.xml</licensesOutputFile>
                                    <excludedScopes>system,provided</excludedScopes>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>javadocDist</id>
            <properties>
                <javadoc.branding>WildFly public API - ${project.version}</javadoc.branding>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>${version.javadoc.plugin}</version>
                        <executions>
                            <execution>
                                <id>javadocs-dist</id>
                                <goals>
                                    <goal>aggregate-jar</goal>
                                </goals>
                                <phase>validate</phase>
                                <configuration>
                                    <debug>true</debug>
                                    <verbose>true</verbose>
                                    <maxmemory>2400m</maxmemory>
                                    <!-- To prevent problems with author names written in non-UTF-8:
                                    -->
                                    <encoding>ISO-8859-1</encoding>

                                    <windowtitle>${javadoc.branding} public API</windowtitle>
                                    <doctitle>${javadoc.branding} public API</doctitle>
                                    <header>${javadoc.branding}</header>
                                    <footer>${javadoc.branding}</footer>

                                    <includeDependencySources>true</includeDependencySources>
                                    <dependencySourceIncludes>
                                        <!-- Filled by a script during creation of Javadoc. -->
                                    </dependencySourceIncludes>

                                    <dependencySourceExcludes>
                                        <!-- Filled by a script during creation of Javadoc. -->
                                    </dependencySourceExcludes>

                                    <groups>
                                        <!-- Filled by a script during creation of Javadoc. -->
                                    </groups>

                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
