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

    <artifactId>keycloak-js-admin-client</artifactId>

    <name>Keycloak JavaScript Admin Client</name>
    <description>A JavaScript client to interact with Keycloak's Administration API.</description>
    <packaging>pom</packaging>

    <profiles>
        <profile>
            <id>jboss-release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-antrun-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>create-target-dir</id>
                                <phase>prepare-package</phase>
                                <configuration>
                                    <target>
                                        <mkdir dir="./target" />
                                    </target>
                                </configuration>
                                <goals>
                                    <goal>run</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>com.github.eirslett</groupId>
                        <artifactId>frontend-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>pnpm-pack</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>pnpm</goal>
                                </goals>
                                <configuration>
                                    <arguments>pack --pack-destination=target</arguments>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <configuration>
                    <skip>true</skip>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
