<?xml version="1.0" encoding="UTF-8"?>
<!--
    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF licenses this file
    to you 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>
    <groupId>org.apache.guacamole</groupId>
    <artifactId>guacamole-auth-sso-ssl</artifactId>
    <packaging>jar</packaging>
    <version>1.6.0</version>
    <name>guacamole-auth-sso-ssl</name>
    <url>http://guacamole.apache.org/</url>

    <parent>
        <groupId>org.apache.guacamole</groupId>
        <artifactId>guacamole-auth-sso</artifactId>
        <version>1.6.0</version>
        <relativePath>../../</relativePath>
    </parent>

    <build>
        <plugins>

            <!-- JS/CSS Minification Plugin -->
            <plugin>
                <groupId>com.github.buckelieg</groupId>
                <artifactId>minify-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>default-cli</id>
                        <configuration>
                            <charset>UTF-8</charset>

                            <webappSourceDir>${basedir}/src/main/resources</webappSourceDir>
                            <webappTargetDir>${project.build.directory}/classes</webappTargetDir>

                            <jsSourceDir>/</jsSourceDir>
                            <jsTargetDir>/</jsTargetDir>
                            <jsFinalFile>ssl.js</jsFinalFile>

                            <jsSourceFiles>
                                <jsSourceFile>license.txt</jsSourceFile>
                            </jsSourceFiles>

                            <jsSourceIncludes>
                                <jsSourceInclude>**/*.js</jsSourceInclude>
                            </jsSourceIncludes>

                            <!-- Do not minify and include tests -->
                            <jsSourceExcludes>
                                <jsSourceExclude>**/*.test.js</jsSourceExclude>
                            </jsSourceExcludes>
                            <jsEngine>CLOSURE</jsEngine>

                            <!-- Disable warnings for JSDoc annotations -->
                            <closureWarningLevels>
                                <misplacedTypeAnnotation>OFF</misplacedTypeAnnotation>
                                <nonStandardJsDocs>OFF</nonStandardJsDocs>
                            </closureWarningLevels>

                        </configuration>
                        <goals>
                            <goal>minify</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

        </plugins>
    </build>
    <dependencies>

        <!-- Guacamole Extension API -->
        <dependency>
            <groupId>org.apache.guacamole</groupId>
            <artifactId>guacamole-ext</artifactId>
        </dependency>

        <!-- Core SSO support -->
        <dependency>
            <groupId>org.apache.guacamole</groupId>
            <artifactId>guacamole-auth-sso-base</artifactId>
        </dependency>

        <!-- Guice -->
        <dependency>
            <groupId>com.google.inject</groupId>
            <artifactId>guice</artifactId>
        </dependency>

        <!-- Java servlet API -->
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
        </dependency>

        <!-- JAX-RS Annotations -->
        <dependency>
            <groupId>javax.ws.rs</groupId>
            <artifactId>jsr311-api</artifactId>
        </dependency>

        <!-- Use FIPS variant of Bouncy Castle crypto library -->
        <dependency>
            <groupId>org.bouncycastle</groupId>
            <artifactId>bcpkix-fips</artifactId>
            <version>2.1.9</version>

            <exclusions>

                <!--
                    Force usage of known version of bc-fips, rather than a
                    future unknown version (bcpkix-fips references bc-fips using
                    a version range, resulting in newer versions getting pulled
                    in automatically, breaking the automated license check).
                -->
                <exclusion>
                    <groupId>org.bouncycastle</groupId>
                    <artifactId>bc-fips</artifactId>
                </exclusion>

                <!--
                    Force usage of known version of bcutil-fips, rather than a
                    future unknown version (bcpkix-fips references bctuil-fips
                    using a version range, resulting in newer versions getting
                    pulled in automatically, breaking the automated license
                    check).
                -->
                <exclusion>
                    <groupId>org.bouncycastle</groupId>
                    <artifactId>bcutil-fips</artifactId>
                </exclusion>
            </exclusions>

        </dependency>

        <!-- Force usage of known version of bc-fips (see bcpkix-fips above) -->
        <dependency>
            <groupId>org.bouncycastle</groupId>
            <artifactId>bc-fips</artifactId>
            <version>2.1.0</version>
        </dependency>

        <!-- Force usage of known version of bcutil-fips (see bcpkix-fips above) -->
        <dependency>
            <groupId>org.bouncycastle</groupId>
            <artifactId>bcutil-fips</artifactId>
            <version>2.1.4</version>
        </dependency>

    </dependencies>

</project>
