<?xml version="1.0" encoding="UTF-8"?>
<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.keycloak.documentation</groupId>
        <artifactId>documentation-parent</artifactId>
        <version>26.0.7.redhat-00001</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <name>Aggregation</name>
    <artifactId>aggregation</artifactId>
    <packaging>pom</packaging>

    <dependencies>
        <dependency>
            <groupId>org.keycloak.documentation</groupId>
            <artifactId>api-documentation</artifactId>
            <version>26.0.7.redhat-00001</version>
            <type>pom</type>
        </dependency>
        <dependency>
            <groupId>org.keycloak.documentation</groupId>
            <artifactId>authorization-services</artifactId>
            <version>26.0.7.redhat-00001</version>
            <type>pom</type>
        </dependency>
        <dependency>
            <groupId>org.keycloak.documentation</groupId>
            <artifactId>server-admin</artifactId>
            <version>26.0.7.redhat-00001</version>
            <type>pom</type>
        </dependency>
        <dependency>
            <groupId>org.keycloak.documentation</groupId>
            <artifactId>server-development</artifactId>
            <version>26.0.7.redhat-00001</version>
            <type>pom</type>
        </dependency>
        <dependency>
            <groupId>org.keycloak.documentation</groupId>
            <artifactId>release-notes</artifactId>
            <version>26.0.7.redhat-00001</version>
            <type>pom</type>
        </dependency>
    </dependencies>

    <build>
        <outputDirectory>../target</outputDirectory>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-api_documentation</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.outputDirectory}/api_documentation/</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>../api_documentation/target/generated-docs</directory>
                                    <include>**/**</include>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                    <execution>
                        <id>copy-authorization_services</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.outputDirectory}/authorization_services/</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>../authorization_services/target/generated-docs</directory>
                                    <include>**/**</include>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                    <execution>
                        <id>copy-getting_started</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.outputDirectory}/getting_started/</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>../getting_started/target/generated-docs</directory>
                                    <include>**/**</include>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                    <execution>
                        <id>copy-server_admin</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.outputDirectory}/server_admin/</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>../server_admin/target/generated-docs</directory>
                                    <include>**/**</include>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                    <execution>
                        <id>copy-server_development</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.outputDirectory}/server_development/</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>../server_development/target/generated-docs</directory>
                                    <include>**/**</include>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                    <execution>
                        <id>copy-release_notes</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.outputDirectory}/release_notes/</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>../release_notes/target/generated-docs</directory>
                                    <include>**/**</include>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                    <execution>
                        <id>copy-upgrading</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.outputDirectory}/upgrading/</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>../upgrading/target/generated-docs</directory>
                                    <include>**/**</include>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                    <execution>
                        <id>copy-index</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.outputDirectory}/</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>src</directory>
                                    <include>*.html</include>
                                    <include>*.png</include>
                                    <filtering>true</filtering>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <executions>
                    <execution>
                        <id>echo-output-aggregation</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <target>
                                <echo>OUTPUT (no-frames): file://${project.build.outputDirectory}/index.html</echo>
                            </target>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
