<?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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <artifactId>keycloak-js-parent</artifactId>
        <groupId>org.keycloak</groupId>
        <version>25.0.2</version>
        <relativePath>../../pom.xml</relativePath>
    </parent>

    <artifactId>keycloak-admin-ui</artifactId>

    <name>Keycloak Admin UI</name>
    <description>The user inferface to administrate the Keycloak server.</description>

    <profiles>
        <profile>
            <id>withTranslations</id>
            <activation>
                <property>
                    <name>!skipCommunityTranslations</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-resources-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>copy-resources</id>
                                <phase>generate-resources</phase>
                                <goals>
                                    <goal>copy-resources</goal>
                                </goals>
                                <configuration>
                                    <outputDirectory>${project.build.outputDirectory}</outputDirectory>
                                    <resources>
                                        <resource>
                                            <directory>maven-resources-community</directory>
                                        </resource>
                                    </resources>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <build>
        <resources>
            <resource>
                <directory>maven-resources</directory>
            </resource>
            <resource>
                <directory>dist</directory>
                <targetPath>theme/keycloak.v2/admin/resources</targetPath>
                <excludes>
                    <exclude>index.html</exclude>
                </excludes>
            </resource>
        </resources>

        <plugins>
            <plugin>
                <groupId>com.github.eirslett</groupId>
                <artifactId>frontend-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
</project>