<?xml version="1.0" encoding="UTF-8"?>
<!--
 * The contents of this file are subject to the terms of the Common Development and
 * Distribution License (the License). You may not use this file except in compliance with the
 * License.
 *
 * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
 * specific language governing permission and limitations under the License.
 *
 * When distributing Covered Software, include this CDDL Header Notice in each file and include
 * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
 * Header, with the fields enclosed by brackets [] replaced by your own identifying
 * information: "Portions copyright [year] [name of copyright owner]".
 *
 * Copyright 2011-2016 ForgeRock AS.
 * Portions copyright 2025 3A Systems LLC.
-->
<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 Project -->
    <parent>
        <groupId>org.openidentityplatform.openam</groupId>
        <artifactId>openam-distribution</artifactId>
        <version>16.1.0</version>
    </parent>

    <!-- Component Definition -->
    <name>OpenAM Distribution ssoAdminTools</name>
    <description>OpenAM Distribution SSO Admin Tools Kit.
    </description>
    <artifactId>openam-distribution-ssoadmintools</artifactId>
    <packaging>pom</packaging>
    <properties>
    </properties>


    <!-- Build -->
    <build>
        <finalName>SSOAdminTools-${project.version}</finalName>
        <plugins>
            <!-- Get the relevant license from Artifactory -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>2.10</version>
                <executions>
                    <execution>
                        <id>Copy license</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>${license.groupId}</groupId>
                                    <artifactId>${license.artifactId}</artifactId>
                                    <version>${license.version}</version>
                                    <type>txt</type>
                                    <overWrite>true</overWrite>
                                    <outputDirectory>${project.build.directory}/legal-notices</outputDirectory>
                                    <destFileName>license.txt</destFileName>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                    <execution>
                        <id>Copy JARs</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/lib</outputDirectory>
                            <overWriteReleases>false</overWriteReleases>
                            <overWriteSnapshots>true</overWriteSnapshots>
                            <overWriteIfNewer>true</overWriteIfNewer>
                            <excludeArtifactIds>${license.artifactId},openam-rest,openam-installtools,openam-slf4j</excludeArtifactIds>
                            <prependGroupId>true</prependGroupId>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <!-- Pre-Packaging step for Zip Elements. -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <executions>
                    <execution>
                        <id>zip-pre-packaging</id>
                        <phase>compile</phase>
                        <configuration>
                            <target>

                                <property name="build.class.path" refid="maven.compile.classpath" />
                                <property name="project.basedir" value="./" />

                                <property name="target.resources.dir" value="${project.build.directory}/resources" />

                                <property name="resources.i18n.dir" value="${project.basedir}/../../openam-locale/src/main/resources/locale" />

                                <tstamp>
                                    <format property="war.time.stamp" pattern="yyyy-MMMM-dd HH:mm" locale="en,UK" />
                                </tstamp>
                                <property name="version.set" value="${project.version}" />

                                <filter token="DATESTAMP" value="${war.time.stamp}" />
                                <filter token="VERSION" value="${version.set}" />

                                <!-- Set our Version Information for the Package -->
                                <copy todir="${project.build.directory}/resources" overwrite="true" filtering="true" flatten="yes">
                                    <fileset dir="${project.basedir}/../../openam-server-only/src/main/resources/config">
                                        <include name="serviceDefaultValues.properties" />
                                    </fileset>
                                </copy>
                            </target>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <executions>
                    <execution>
                        <id>admintools-assembly</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <appendAssemblyId>false</appendAssemblyId>
                            <tarLongFileMode>gnu</tarLongFileMode>
                            <descriptors>
                                <descriptor>src/main/assembly/openAMToolsAssembly_Descriptor.xml</descriptor>
                            </descriptors>
                            <escapeString>\</escapeString>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>org.openidentityplatform.openam</groupId>
            <artifactId>openam-entitlements</artifactId>
        </dependency>

        <dependency>
            <groupId>org.openidentityplatform.openam</groupId>
            <artifactId>openam-installtools</artifactId>
        </dependency>

        <dependency>
            <groupId>org.openidentityplatform.openam</groupId>
            <artifactId>openam-core</artifactId>
        </dependency>

        <dependency>
            <groupId>org.openidentityplatform.openam</groupId>
            <artifactId>openam-cli-definitions</artifactId>
        </dependency>

        <dependency>
            <groupId>org.openidentityplatform.openam</groupId>
            <artifactId>openam-cli-impl</artifactId>
        </dependency>

        <dependency>
            <groupId>org.openidentityplatform.openam</groupId>
            <artifactId>openam-federation-library</artifactId>
        </dependency>

        <dependency>
            <groupId>org.openidentityplatform.openam</groupId>
            <artifactId>OpenFM</artifactId>
        </dependency>

        <dependency>
            <groupId>org.openidentityplatform.openam</groupId>
            <artifactId>openam-dtd-schema</artifactId>
        </dependency>

        <dependency>
            <groupId>org.openidentityplatform.openam</groupId>
            <artifactId>openam-jaxrpc-schema</artifactId>
        </dependency>

        <dependency>
            <groupId>org.openidentityplatform.openam</groupId>
            <artifactId>openam-saml2-schema</artifactId>
        </dependency>

        <dependency>
            <groupId>org.openidentityplatform.openam</groupId>
            <artifactId>openam-auth-scripted</artifactId>
        </dependency>

        <dependency>
            <groupId>org.openidentityplatform.openam</groupId>
            <artifactId>openam-scripting</artifactId>
        </dependency>

        <dependency>
            <groupId>jakarta.servlet</groupId>
            <artifactId>jakarta.servlet-api</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.openidentityplatform.openam</groupId>
            <artifactId>openam-license-manager-cli</artifactId>
        </dependency>

        <dependency>
            <groupId>org.openidentityplatform.commons.http-framework</groupId>
            <artifactId>core</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.santuario</groupId>
       	    <artifactId>xmlsec</artifactId>
        </dependency>

        <dependency>
        	<groupId>commons-logging</groupId>
        	<artifactId>commons-logging-api</artifactId>
        </dependency>

        <dependency>
            <groupId>commons-collections</groupId>
            <artifactId>commons-collections</artifactId>
        </dependency>

        <dependency>
            <groupId>org.openidentityplatform.openam</groupId>
            <artifactId>openam-slf4j</artifactId>
            <scope>runtime</scope>
        </dependency>

        <dependency>
            <groupId>org.openidentityplatform.opendj</groupId>
            <artifactId>opendj-core</artifactId>
        </dependency>

        <dependency>
            <groupId>jakarta.inject</groupId>
            <artifactId>jakarta.inject-api</artifactId>
        </dependency>

        <dependency>
            <groupId>org.openidentityplatform.opendj</groupId>
            <artifactId>opendj-grizzly</artifactId>
        </dependency>

        <dependency>
            <groupId>org.openidentityplatform.openam</groupId>
            <artifactId>openam-auth-fr-oath</artifactId>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-nop</artifactId>
        </dependency>

    </dependencies>
</project>

