<?xml version="1.0" encoding="UTF-8"?>
<!--

	Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation.
    Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.

    This program and the accompanying materials are made available under the
    terms of the Eclipse Public License v. 2.0, which is available at
    http://www.eclipse.org/legal/epl-2.0.

    This Source Code may also be made available under the following Secondary
    Licenses when the conditions for such availability set forth in the
    Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
    version 2 with the GNU Classpath Exception, which is available at
    https://www.gnu.org/software/classpath/license.html.

    SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0

-->

<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.eclipse.ee4j</groupId>
        <artifactId>project</artifactId>
        <version>1.0.8</version>
    </parent>

    <groupId>org.glassfish.soteria</groupId>
    <artifactId>parent</artifactId>
    <version>3.0.4</version>
    <packaging>pom</packaging>

	<name>Soteria Parent</name>
    <description>Compatible Implementation for Jakarta Security API</description>
    <inceptionYear>2015</inceptionYear>
    <licenses>
        <license>
            <name>EPL 2.0</name>
            <url>http://www.eclipse.org/legal/epl-2.0</url>
            <distribution>repo</distribution>
        </license>
        <license>
            <name>GPL2 w/ CPE</name>
            <url>https://www.gnu.org/software/classpath/license.html</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>arjantijms</id>
            <name>Arjan Tijms</name>
            <email>arjan.tijms@gmail.com</email>
            <roles>
                <role>Lead</role>
            </roles>
        </developer>
    </developers>

    <modules>
        <module>impl</module>
        <module>spi</module>
    </modules>

    <scm>
        <connection>scm:git:https://github.com/eclipse-ee4j/soteria.git</connection>
        <developerConnection>scm:git:https://github.com/eclipse-ee4j/soteria.git</developerConnection>
        <url>https://github.com/eclipse-ee4j/soteria</url>
        <tag>HEAD</tag>
    </scm>

    <properties>
        <api_dependency_version>3.0.0</api_dependency_version>

        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

        <maven.compiler.release>11</maven.compiler.release>
    </properties>

    <dependencies>
        <dependency>
            <groupId>jakarta.security.enterprise</groupId>
            <artifactId>jakarta.security.enterprise-api</artifactId>
            <version>${api_dependency_version}</version>
        </dependency>
        
        <dependency>
            <groupId>jakarta.servlet</groupId>
            <artifactId>jakarta.servlet-api</artifactId>
            <version>6.0.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>jakarta.interceptor</groupId>
            <artifactId>jakarta.interceptor-api</artifactId>
            <version>2.1.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>jakarta.el</groupId>
            <artifactId>jakarta.el-api</artifactId>
            <version>5.0.1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>jakarta.enterprise</groupId>
            <artifactId>jakarta.enterprise.cdi-api</artifactId>
            <version>4.0.1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>jakarta.annotation</groupId>
            <artifactId>jakarta.annotation-api</artifactId>
            <version>2.1.1</version>
        </dependency>
        <dependency>
            <groupId>jakarta.authentication</groupId>
            <artifactId>jakarta.authentication-api</artifactId>
            <version>3.0.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>jakarta.authorization</groupId>
            <artifactId>jakarta.authorization-api</artifactId>
            <version>2.1.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>jakarta.json</groupId>
            <artifactId>jakarta.json-api</artifactId>
            <version>2.1.2</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>jakarta.ejb</groupId>
            <artifactId>jakarta.ejb-api</artifactId>
            <version>4.0.1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>jakarta.xml.bind</groupId>
            <artifactId>jakarta.xml.bind-api</artifactId>
            <version>4.0.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>jakarta.ws.rs</groupId>
            <artifactId>jakarta.ws.rs-api</artifactId>
            <version>3.1.0</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.nimbusds</groupId>
            <artifactId>nimbus-jose-jwt</artifactId>
            <version>10.4.2</version>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.13.2</version>
            <scope>test</scope>
        </dependency>

    </dependencies>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.glassfish.copyright</groupId>
                    <artifactId>glassfish-copyright-maven-plugin</artifactId>
                    <version>2.4</version>
                    <configuration>
                        <scm>git</scm>
                        <scmOnly>true</scmOnly>
                        <exclude>
                            <pattern>/LICENSE.txt</pattern>
                            <pattern>/README.md</pattern>
                        </exclude>
                    </configuration>
                    <executions>
                        <execution>
                            <id>check-copyright</id>
                            <phase>process-test-sources</phase>
                            <goals>
                                <goal>copyright</goal>
                                <goal>check</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-war-plugin</artifactId>
						<version>3.3.2</version>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-compiler-plugin</artifactId>
						<version>3.10.1</version>
					</plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <!-- Sets minimal Maven version to 3.6.3 -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>3.0.0</version>
                <executions>
                    <execution>
                        <id>enforce-maven</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireMavenVersion>
                                    <version>3.6.3</version>
                                </requireMavenVersion>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <!-- Configure the jar with the javadoc. -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-api-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <configuration>
                            <additionalJOption>-Xdoclint:none</additionalJOption>
                            <quiet>true</quiet>
                            <notimestamp>true</notimestamp>
                            <splitindex>true</splitindex>
                            <doctitle>${project.name} ${project.version}</doctitle>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <!-- Configure the jar with the sources. -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>test</id>
            <modules>
                <module>test</module>
            </modules>
        </profile>

        <profile>
            <id>only-eclipse</id>
            <activation>
                <property>
                    <name>m2e.version</name>
                </property>
            </activation>
            <build>
                <pluginManagement>
                    <plugins>
                        <!-- This plugin's configuration is used to store Eclipse m2e settings only. It has no influence 
                            on the Maven build itself. -->
                        <plugin>
                            <groupId>org.eclipse.m2e</groupId>
                            <artifactId>lifecycle-mapping</artifactId>
                            <version>1.0.0</version>
                            <configuration>
                                <lifecycleMappingMetadata>
                                    <pluginExecutions>
                                        <pluginExecution>
                                            <pluginExecutionFilter>
                                                <groupId>org.glassfish.build</groupId>
                                                <artifactId>spec-version-maven-plugin</artifactId>
                                                <versionRange>[1.2,)</versionRange>
                                                <goals>
                                                    <goal>set-spec-properties</goal>
                                                </goals>
                                            </pluginExecutionFilter>
                                            <action>
                                                <ignore/>
                                            </action>
                                        </pluginExecution>
                                        <pluginExecution>
                                            <pluginExecutionFilter>
                                                <groupId>org.glassfish.copyright</groupId>
                                                <artifactId>glassfish-copyright-maven-plugin</artifactId>
                                                <versionRange>[1.2,)</versionRange>
                                                <goals>
                                                    <goal>copyright</goal>
                                                    <goal>check</goal>
                                                </goals>
                                            </pluginExecutionFilter>
                                            <action>
                                                <ignore/>
                                            </action>
                                        </pluginExecution>
                                        <pluginExecution>
                                            <pluginExecutionFilter>
                                                <groupId>org.apache.maven.plugins</groupId>
                                                <artifactId>maven-dependency-plugin</artifactId>
                                                <versionRange>[3.1.0,)</versionRange>
                                                <goals>
                                                    <goal>unpack</goal>
                                                </goals>
                                            </pluginExecutionFilter>
                                            <action>
                                                <ignore/>
                                            </action>
                                        </pluginExecution>
                                    </pluginExecutions>
                                </lifecycleMappingMetadata>
                            </configuration>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>
        
        <profile>
            <id>central-release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.sonatype.central</groupId>
                        <artifactId>central-publishing-maven-plugin</artifactId>
                        <version>0.8.0</version>
                        <extensions>true</extensions>
                        <configuration>
                            <publishingServerId>central</publishingServerId>
                            <autoPublish>true</autoPublish>
                            <!-- waitUntil>published</waitUntil -->
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
