<?xml version="1.0" encoding="UTF-8"?>
<!-- See LICENSE.txt file in the root directory of this repository for the copyright/license information. -->
<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>
        <artifactId>idp-plugin-oidc-op-parent</artifactId>
        <groupId>net.shibboleth.idp.plugin.oidc</groupId>
        <version>3.0.0-alpha1</version>
    </parent>
    
    <artifactId>idp-plugin-oidc-op-impl</artifactId>
    <description>OpenID Connect Provider plugin implementation.</description>
    <name>Shibboleth IdP :: Plugins :: OpenID Connect Provider Implementation</name>
    <packaging>jar</packaging>
    
    <properties>
        <checkstyle.configLocation>${project.basedir}/../resources/checkstyle.xml</checkstyle.configLocation>
        <automatic.module.name>net.shibboleth.idp.plugin.oidc.op.impl</automatic.module.name>
    </properties>
        
    <dependencies>
        <!-- compile dependencies -->
          <dependency>
            <groupId>net.shibboleth.idp.plugin.oidc</groupId>
            <artifactId>idp-plugin-oidc-op-api</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
        </dependency>
    
        <!-- provided dependencies -->
         <dependency>
            <groupId>net.minidev</groupId>
            <artifactId>json-smart</artifactId>     
            <scope>provided</scope>   
        </dependency>
        <dependency>
            <groupId>com.nimbusds</groupId>
            <artifactId>lang-tag</artifactId>     
            <scope>provided</scope>   
        </dependency>
        <dependency>
            <groupId>com.nimbusds</groupId>
            <artifactId>oauth2-oidc-sdk</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>net.shibboleth.idp</groupId>
            <artifactId>idp-authn-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>net.shibboleth.idp</groupId>
            <artifactId>idp-attribute-resolver-spring</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.opensaml</groupId>
            <artifactId>opensaml-storage-api</artifactId>
            <scope>provided</scope>
        </dependency>      
        <dependency>
            <groupId>net.shibboleth.idp</groupId>
            <artifactId>idp-attribute-filter-spring</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>net.shibboleth.idp</groupId>
            <artifactId>idp-attribute-filter-impl</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>net.shibboleth.idp</groupId>
            <artifactId>idp-consent-impl</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>net.shibboleth.idp</groupId>
            <artifactId>idp-ui</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>net.shibboleth.oidc</groupId>
            <artifactId>oidc-common-attribute-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>net.shibboleth.oidc</groupId>
            <artifactId>oidc-common-attribute-impl</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>net.shibboleth.oidc</groupId>
            <artifactId>oidc-common-crypto-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>net.shibboleth.oidc</groupId>
            <artifactId>oidc-common-crypto-impl</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>net.shibboleth.oidc</groupId>
            <artifactId>oidc-common-metadata-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>net.shibboleth.oidc</groupId>
            <artifactId>oidc-common-metadata-impl</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>net.shibboleth.oidc</groupId>
            <artifactId>oidc-common-saml-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>${slf4j.groupId}</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.opensaml</groupId>
            <artifactId>opensaml-profile-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>net.shibboleth.idp</groupId>
            <artifactId>idp-attribute-filter-api</artifactId>
            <scope>provided</scope>
        </dependency> 
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>net.shibboleth.idp</groupId>
            <artifactId>idp-admin-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <!-- Needed to allow module/plugin derivation. -->
        <dependency>
            <groupId>net.shibboleth.idp</groupId>
            <artifactId>idp-admin-impl</artifactId>
            <scope>provided</scope>
        </dependency>
        <!-- Test Dependencies -->
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <scope>test</scope>
        </dependency>
        <!-- Needed for Nimbus use in tests. -->
        <dependency>
            <groupId>com.sun.mail</groupId>
            <artifactId>jakarta.mail</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.codehaus.janino</groupId>
            <artifactId>janino</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>net.shibboleth.idp</groupId>
            <artifactId>idp-profile-api</artifactId>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>net.shibboleth.idp</groupId>
            <artifactId>idp-attribute-filter-spring</artifactId>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.opensaml</groupId>
            <artifactId>opensaml-core</artifactId>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>net.shibboleth.idp</groupId>
            <artifactId>idp-attribute-resolver-spring</artifactId>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>net.shibboleth.idp</groupId>
            <artifactId>idp-authn-impl</artifactId>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>net.shibboleth.idp</groupId>
            <artifactId>idp-authn-impl</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>net.shibboleth.idp</groupId>
            <artifactId>idp-authn-api</artifactId>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>net.shibboleth.idp</groupId>
            <artifactId>idp-core</artifactId>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>net.shibboleth.idp</groupId>
            <artifactId>idp-saml-impl</artifactId>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>net.shibboleth.idp</groupId>
            <artifactId>idp-conf</artifactId>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>net.shibboleth.idp</groupId>
            <artifactId>idp-conf</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>net.shibboleth.idp</groupId>
            <artifactId>idp-conf-impl</artifactId>
            <scope>test</scope>
        </dependency>    
        <dependency>
            <groupId>org.opensaml</groupId>
            <artifactId>opensaml-profile-impl</artifactId>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.opensaml</groupId>
            <artifactId>opensaml-profile-api</artifactId>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.opensaml</groupId>
            <artifactId>opensaml-profile-impl</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.opensaml</groupId>
            <artifactId>opensaml-storage-impl</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.opensaml</groupId>
            <artifactId>opensaml-messaging-impl</artifactId>
            <optional>true</optional>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>net.shibboleth.idp.plugin.oidc</groupId>
            <artifactId>idp-plugin-oidc-op-api</artifactId>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.unboundid</groupId>
            <artifactId>unboundid-ldapsdk</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>${spring.groupId}</groupId>
            <artifactId>spring-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>net.shibboleth.oidc</groupId>
            <artifactId>oidc-common-saml-impl</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>net.shibboleth.idp</groupId>
            <artifactId>idp-session-impl</artifactId>
            <scope>test</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>net.shibboleth.idp</groupId>
            <artifactId>idp-cas-impl</artifactId>
            <scope>test</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>net.shibboleth.ext</groupId>
            <artifactId>spring-extensions</artifactId>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hsqldb</groupId>
            <artifactId>hsqldb</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
	       <groupId>net.shibboleth.utilities</groupId>
	       <artifactId>java-support</artifactId>
	       <type>test-jar</type>
	       <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>net.shibboleth.idp.plugin.scripting</groupId>
            <artifactId>idp-plugin-nashorn-impl</artifactId>
            <version>${nashorn.engine.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.graalvm.sdk</groupId>
            <artifactId>graal-sdk</artifactId>
            <version>${graalvm.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.graalvm.js</groupId>
            <artifactId>js</artifactId>
            <version>${graalvm.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <build>
        <plugins>
             <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>                    
                    <execution>
                        <id>unpack</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>unpack-dependencies</goal>
                        </goals>
                        <configuration>
                            <includeGroupIds>net.shibboleth.idp</includeGroupIds>
                            <includeArtifactIds>idp-conf</includeArtifactIds>
                            <outputDirectory>${project.build.directory}/classes</outputDirectory>
                            <includes>conf/**,credentials/ldap-server.crt</includes>
                        </configuration>
                    </execution>
                    <execution>
                        <id>copy-dependencies</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.target.directory}</outputDirectory>
                            <includeScope>runtime</includeScope>
                            <excludeTransitive>true</excludeTransitive>
                        </configuration>
                    </execution>
                </executions>
            </plugin>            
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifestEntries>
                            <Automatic-Module-Name>${automatic.module.name}</Automatic-Module-Name>
                        </manifestEntries>
                        <manifestSections>
                            <manifestSection>
                                <name>net/shibboleth/idp/plugin/oidc/op/</name>
                                <manifestEntries>
                                    <Implementation-Title>${project.artifactId}</Implementation-Title>
                                    <Implementation-Version>${project.version}</Implementation-Version>
                                    <Implementation-Vendor>shibboleth.net</Implementation-Vendor>
                                </manifestEntries>
                            </manifestSection>
                        </manifestSections>
                    </archive>
                    <excludes>
                        <exclude>conf/**</exclude>
                        <exclude>credentials/**</exclude>
                    </excludes>
                </configuration>
            </plugin>
        </plugins>
    </build>


</project>
