<!--
  ~ Copyright 2017 Okta, Inc.
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~     http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->
<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>
        <groupId>com.okta</groupId>
        <artifactId>okta-parent</artifactId>
        <version>2</version>
        <relativePath>../okta-java-parent</relativePath>
    </parent>

    <groupId>com.okta.oidc.tck</groupId>
    <artifactId>okta-oidc-tck</artifactId>
    <version>0.2.2</version>

    <name>Okta OIDC TCK</name>

    <properties>
        <github.slug>okta/okta-oidc-tck</github.slug>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-all</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <scope>compile</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.beanshell</groupId>
                    <artifactId>bsh</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.github.tomakehurst</groupId>
            <artifactId>wiremock</artifactId>
            <version>2.8.0</version>
            <exclusions>
                <exclusion>
                    <groupId>commons-logging</groupId>
                    <artifactId>commons-logging</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>io.rest-assured</groupId>
            <artifactId>rest-assured</artifactId>
            <version>3.0.3</version>
        </dependency>
        <dependency>
            <groupId>io.jsonwebtoken</groupId>
            <artifactId>jjwt</artifactId>
            <version>0.7.0</version>
        </dependency>
        <dependency>
            <groupId>org.yaml</groupId>
            <artifactId>snakeyaml</artifactId>
            <version>1.19</version>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>java-hamcrest</artifactId>
            <scope>compile</scope>
        </dependency>

        <!-- Logging -->
        <dependency>
            <!-- Required for any libraries that expect to call the commons logging APIs -->
            <groupId>org.slf4j</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <scope>runtime</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.jasig.maven</groupId>
                <artifactId>maven-notice-plugin</artifactId>
                <version>1.0.6.1</version>
                <inherited>false</inherited>
                <configuration>
                    <fileName>THIRD-PARTY-NOTICES</fileName>
                    <generateChildNotices>false</generateChildNotices>
                    <noticeTemplate>${root.dir}/src/license/NOTICE.template</noticeTemplate>
                    <licenseMapping>
                        <mapping>src/license/mapping.xml</mapping>
                    </licenseMapping>
                </configuration>
                <executions>
                    <execution>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.bluetrainsoftware.maven</groupId>
                <artifactId>groovydoc-maven-plugin</artifactId>
                <version>2.1</version>
                <executions>
                    <execution>
                        <id>attach-docs</id>
                        <phase>package</phase>
                        <goals>
                            <goal>attach-docs</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.1.0</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <shadedArtifactAttached>true</shadedArtifactAttached>
                            <createDependencyReducedPom>false</createDependencyReducedPom>
                            <artifactSet>
                                <excludes>
                                    <exclude>org.codehaus.groovy:groovy</exclude>
                                    <exclude>org.codehaus.groovy:groovy-xml</exclude>
                                    <exclude>org.codehaus.groovy:groovy-json</exclude>
                                    <exclude>org.hamcrest:hamcrest-library</exclude>
                                    <exclude>org.hamcrest:hamcrest-core</exclude>
                                </excludes>
                            </artifactSet>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>3.1.0</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <descriptors>
                                <descriptor>src/e2e-assembly.xml</descriptor>
                            </descriptors>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <!-- this needs to be fixed in the parent pom -->
    <profiles>
        <profile>
            <id>pub-docs</id>
            <build>

                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-scm-publish-plugin</artifactId>
                            <version>1.1</version>
                            <configuration>
                                <checkinComment>Publishing javadoc for ${project.artifactId}:${project.version}</checkinComment>
                                <content>${gh-pages.dir}</content>
                                <skipDeletedFiles>true</skipDeletedFiles>
                                <pubScmUrl>scm:git:https://${github.api.key}@github.com/${github.slug}.git</pubScmUrl>
                                <scmBranch>gh-pages</scmBranch> <!-- branch with static site -->
                                <checkoutDirectory>${project.build.directory}/scmpublish-checkout-javadoc</checkoutDirectory>
                            </configuration>
                        </plugin>
                    </plugins>
                </pluginManagement>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-scm-publish-plugin</artifactId>
                        <version>1.1</version>
                        <inherited>false</inherited>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
    <!-- end fix in parent -->

  <scm>
    <tag>okta-oidc-tck-0.2.2</tag>
  </scm>
</project>
