<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2017 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-docs-userguide-tool-integrated-eap7.1</artifactId>

    <name>JBoss Server Migration: Docs User-Guide Tool Integrated EAP 7.1</name>

    <dependencies>
        <!-- includes -->
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>jboss-server-migration-docs-userguide-tool-includes</artifactId>
        </dependency>
        <!-- migrations -->
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>jboss-server-migration-docs-userguide-migration-eap6.4-to-eap7.1</artifactId>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>jboss-server-migration-docs-userguide-migration-eap7.0-to-eap7.1</artifactId>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>jboss-server-migration-docs-userguide-migration-wildfly8.2-to-eap7.1</artifactId>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>jboss-server-migration-docs-userguide-migration-wildfly9.0-to-eap7.1</artifactId>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>jboss-server-migration-docs-userguide-migration-wildfly10.0-to-eap7.1</artifactId>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>jboss-server-migration-docs-userguide-migration-wildfly10.1-to-eap7.1</artifactId>
        </dependency>
    </dependencies>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.asciidoctor</groupId>
                    <artifactId>asciidoctor-maven-plugin</artifactId>
                    <configuration>
                        <attributes>
                            <tool-distributionType>integrated</tool-distributionType>
                        </attributes>
                    </configuration>
                </plugin>
                <plugin>
	                <groupId>org.apache.maven.plugins</groupId>
    	            <artifactId>maven-dependency-plugin</artifactId>
    	            <configuration>
                        <excludes>META-INF/**</excludes>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/asciidoc</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>src/main/asciidoc</directory>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                                       <execution>
                        <id>unpack-includes</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>unpack-dependencies</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/asciidoc</outputDirectory>
                            <includeArtifactIds>jboss-server-migration-docs-userguide-tool-includes</includeArtifactIds>
                        </configuration>
                    </execution>

                    <execution>
                        <id>EAP6.4toEAP7.1</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>unpack-dependencies</goal>
                        </goals>
                        <configuration>	                        
                            <includeArtifactIds>jboss-server-migration-docs-userguide-migration-eap6.4-to-eap7.1</includeArtifactIds>
                            <outputDirectory>${project.build.outputDirectory}/migrations/eap6.4-to-eap7.1</outputDirectory>
                        </configuration>
                    </execution>
                    <execution>
                        <id>EAP7.0toEAP7.1</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>unpack-dependencies</goal>
                        </goals>
                        <configuration>	                        
                            <includeArtifactIds>jboss-server-migration-docs-userguide-migration-eap7.0-to-eap7.1</includeArtifactIds>
                            <outputDirectory>${project.build.outputDirectory}/migrations/eap7.0-to-eap7.1</outputDirectory>
                        </configuration>
                    </execution>
                    <execution>
                        <id>WFLY8.2toEAP7.1</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>unpack-dependencies</goal>
                        </goals>
                        <configuration>	                        
                            <includeArtifactIds>jboss-server-migration-docs-userguide-migration-wildfly8.2-to-eap7.1</includeArtifactIds>
                            <outputDirectory>${project.build.outputDirectory}/migrations/wildfly8.2-to-eap7.1</outputDirectory>
                        </configuration>
                    </execution>
                    <execution>
                        <id>WFLY9.0toEAP7.1</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>unpack-dependencies</goal>
                        </goals>
                        <configuration>	                        
                            <includeArtifactIds>jboss-server-migration-docs-userguide-migration-wildfly9.0-to-eap7.1</includeArtifactIds>
                            <outputDirectory>${project.build.outputDirectory}/migrations/wildfly9.0-to-eap7.1</outputDirectory>
                        </configuration>
                    </execution>
                    <execution>
                        <id>WFLY10.0toEAP7.1</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>unpack-dependencies</goal>
                        </goals>
                        <configuration>	                        
                            <includeArtifactIds>jboss-server-migration-docs-userguide-migration-wildfly10.0-to-eap7.1</includeArtifactIds>
                            <outputDirectory>${project.build.outputDirectory}/migrations/wildfly10.0-to-eap7.1</outputDirectory>
                        </configuration>
                    </execution>
                    <execution>
                        <id>WFLY10.1toEAP7.1</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>unpack-dependencies</goal>
                        </goals>
                        <configuration>	                        
                            <includeArtifactIds>jboss-server-migration-docs-userguide-migration-wildfly10.1-to-eap7.1</includeArtifactIds>
                            <outputDirectory>${project.build.outputDirectory}/migrations/wildfly10.1-to-eap7.1</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.asciidoctor</groupId>
                <artifactId>asciidoctor-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>process-asciidoc</goal>
                        </goals>
                        <configuration>
                            <sourceDocumentName>master.adoc</sourceDocumentName>
                            <outputFile>${project.build.outputDirectory}/index.html</outputFile>
                        </configuration>
                    </execution>                    
                </executions>
            </plugin>
        </plugins>
    </build>

</project>
