<!--

    Licensed to Apereo under one or more contributor license
    agreements. See the NOTICE file distributed with this work
    for additional information regarding copyright ownership.
    Apereo 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 the following location:

      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:merge="http://maven.apache.org/plugin-merge" 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">

  <parent>
    <groupId>org.jasig.portlet</groupId>
    <artifactId>uportal-portlet-parent</artifactId>
    <version>43</version>
  </parent>

  <modelVersion>4.0.0</modelVersion>
  <groupId>org.jasig.resourceserver</groupId>
  <artifactId>resource-server-parent</artifactId>
  <version>1.5.2</version>
  <packaging>pom</packaging>

  <name>Resource Server Parent</name>
  <description>The Resource Server project.</description>
  <url>${jasig-site-base}/resource-server/${project.version}</url>

  <scm>
    <connection>scm:git:git://github.com/uPortal-Project/resource-server.git</connection>
    <developerConnection>scm:git:git@github.com:uPortal-Project/resource-server.git</developerConnection>
    <url>https://github.com/uPortal-Project/resource-server.git</url>
    <tag>resource-server-1.5.2</tag>
  </scm>

  <!--
    | Required by the Central Publisher Portal; without it, the 'manual
    | upload' step returns HTTP 400 with 'Developers information is missing'
    | for every submodule. Inherited by child modules via standard POM
    | inheritance. Matches the pattern uPortal uses in its build.gradle.
  +-->
  <developers>
    <developer>
      <organization>uPortal Developers</organization>
      <organizationUrl>https://github.com/uPortal-Project/resource-server/graphs/contributors</organizationUrl>
    </developer>
  </developers>

  <modules>
    <module>resource-server-api</module>
    <module>resource-server-content</module>
    <module>resource-server-core</module>
    <module>resource-server-plugin</module>
    <module>resource-server-utils</module>
    <module>resource-server-webapp</module>
  </modules>

  <properties>
    <maven.compiler.source>11</maven.compiler.source>
    <maven.compiler.target>11</maven.compiler.target>

    <jaxb2basicsVersion>0.13.1</jaxb2basicsVersion>
    <jaxb-api.version>2.3.1</jaxb-api.version>
    <jaxb-impl.version>2.3.3</jaxb-impl.version>
    <springVersion>5.3.39</springVersion>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>ch.qos.logback</groupId>
        <artifactId>logback-classic</artifactId>
        <version>1.3.12</version>
      </dependency>
      <dependency>
        <groupId>com.google.guava</groupId>
        <artifactId>guava</artifactId>
        <version>32.0.0-android</version>
      </dependency>
      <dependency>
        <groupId>commons-codec</groupId>
        <artifactId>commons-codec</artifactId>
        <version>1.17.1</version>
      </dependency>
      <dependency>
        <groupId>commons-collections</groupId>
        <artifactId>commons-collections</artifactId>
        <version>3.2.2</version>
      </dependency>
      <dependency>
        <groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>2.16.1</version>
      </dependency>
      <dependency>
        <groupId>commons-lang</groupId>
        <artifactId>commons-lang</artifactId>
        <version>2.6</version>
      </dependency>
      <dependency>
        <groupId>javax.servlet.jsp</groupId>
        <artifactId>javax.servlet.jsp-api</artifactId>
        <version>2.3.3</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>jstl</artifactId>
        <version>1.2</version>
      </dependency>
      <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>javax.servlet-api</artifactId>
        <version>3.1.0</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>javax.xml.bind</groupId>
        <artifactId>jaxb-api</artifactId>
        <version>${jaxb-api.version}</version>
      </dependency>
      <dependency>
        <groupId>com.sun.xml.bind</groupId>
        <artifactId>jaxb-impl</artifactId>
        <version>${jaxb-impl.version}</version>
      </dependency>
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.13.2</version>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>2.0.17</version>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>jul-to-slf4j</artifactId>
        <version>2.0.17</version>
      </dependency>
      <dependency>
        <groupId>net.sf.ehcache</groupId>
        <artifactId>ehcache-core</artifactId>
        <version>2.6.11</version>
      </dependency>
      <dependency>
        <groupId>net.sf.ehcache</groupId>
        <artifactId>ehcache-web</artifactId>
        <version>2.0.4</version>
      </dependency>
      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-plugin-api</artifactId>
        <version>3.8.6</version>
      </dependency>
      <dependency>
        <groupId>org.codehaus.plexus</groupId>
        <artifactId>plexus-utils</artifactId>
        <version>3.6.1</version>
      </dependency>
      <dependency>
        <groupId>org.jvnet.jaxb2_commons</groupId>
        <artifactId>jaxb2-basics-runtime</artifactId>
        <version>${jaxb2basicsVersion}</version>
      </dependency>
      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-core</artifactId>
        <version>5.23.0</version>
      </dependency>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-beans</artifactId>
        <version>${springVersion}</version>
        <exclusions>
          <exclusion>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-context</artifactId>
        <version>${springVersion}</version>
        <exclusions>
          <exclusion>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-context-support</artifactId>
        <version>${springVersion}</version>
        <exclusions>
          <exclusion>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-core</artifactId>
        <version>${springVersion}</version>
        <exclusions>
          <exclusion>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-test</artifactId>
        <version>${springVersion}</version>
        <exclusions>
          <exclusion>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-web</artifactId>
        <version>${springVersion}</version>
        <exclusions>
          <exclusion>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-webmvc</artifactId>
        <version>${springVersion}</version>
        <exclusions>
          <exclusion>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>taglibs</groupId>
        <artifactId>standard</artifactId>
        <version>1.1.2</version>
      </dependency>
      <dependency>
        <groupId>xmlunit</groupId>
        <artifactId>xmlunit</artifactId>
        <version>1.6</version>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-compress</artifactId>
        <version>1.27.1</version>
      </dependency>
      <dependency>
        <groupId>io.mvnpm</groupId>
        <artifactId>esbuild-java-bundle-original</artifactId>
        <version>1.5.2</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <!--
    | Central Publisher Portal (OSSRH Staging API compatibility service).
    | Shadows the stale oss.sonatype.org URLs inherited from
    | org.sonatype.oss:oss-parent:9 (via uportal-portlet-parent). Server id
    | 'sonatype-nexus-staging' is preserved so existing ~/.m2/settings.xml
    | credentials keep working; the URL is what changed.
  +-->
  <distributionManagement>
    <repository>
      <id>sonatype-nexus-staging</id>
      <name>Central Portal Release Repository</name>
      <url>https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2/</url>
    </repository>
    <snapshotRepository>
      <id>sonatype-nexus-snapshots</id>
      <name>Central Portal Snapshot Repository</name>
      <url>https://central.sonatype.com/repository/maven-snapshots/</url>
    </snapshotRepository>
  </distributionManagement>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <!--
            | Artifact was renamed from maven-notice-plugin to notice-maven-plugin.
            | The old 1.1.0 coordinate depends on javax.xml.bind.JAXBException which
            | was removed from the JDK in Java 9+, so it fails on Java 11. The new
            | artifactId inherits v2.0.0 from uportal-portlet-parent.
          +-->
          <groupId>org.jasig.maven</groupId>
          <artifactId>notice-maven-plugin</artifactId>
          <configuration>
            <noticeTemplate>NOTICE.template</noticeTemplate>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.jasig.maven</groupId>
          <artifactId>maven-site-plugin</artifactId>
          <configuration>
            <defaultMergePolicy>MERGE</defaultMergePolicy>
            <reportPlugins combine.children="append">
              <plugin>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.10.0</version>
                <configuration>
                  <doclint>none</doclint>
                  <links merge:children="BOTH" merge:removeDuplicates="true">
                    <link>http://static.springsource.org/spring/docs/3.0.x/api/</link>
                    <link>http://ehcache.org/apidocs/</link>
                    <link>http://aopalliance.sourceforge.net/doc/</link>
                    <link>http://java.sun.com/javase/6/docs/api/</link>
                    <link>http://java.sun.com/javaee/5/docs/api/</link>
                  </links>
                  <maxmemory>768m</maxmemory>
                </configuration>
              </plugin>
            </reportPlugins>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>3.1.1</version>
          <dependencies>
            <dependency>
              <groupId>org.apache.maven.scm</groupId>
              <artifactId>maven-scm-provider-gitexe</artifactId>
              <version>2.1.0</version>
            </dependency>
          </dependencies>
          <configuration>
            <autoVersionSubmodules>true</autoVersionSubmodules>
            <localCheckout>true</localCheckout>
            <tagNameFormat>resource-server-@{project.version}</tagNameFormat>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>com.mycila</groupId>
        <artifactId>license-maven-plugin</artifactId>
        <configuration>
          <basedir>${basedir}</basedir>
          <header>${jasig-short-license-url}</header>
          <aggregate>true</aggregate>
          <excludes>
            <exclude>LICENSE</exclude>
            <exclude>NOTICE</exclude>
            <exclude>**/src/main/webapp/rs/**</exclude>
            <exclude>**/src/test/resources/skin-test1/jquery.hoverIntent.bom.js</exclude>
            <exclude>.idea/**</exclude>  <!-- for intelliJ Idea -->
            <exclude>overlays/**</exclude>  <!-- for intelliJ Idea -->
            <!--
              | frontend-maven-plugin installs a Node binary and its bundled npm
              | into resource-server-webapp/node/. Applying a license header there
              | breaks shebangs (e.g. npm-cli.js), causing `npm install` to fail
              | with 'SyntaxError: Invalid or unexpected token'. Node.js only
              | recognizes a shebang when it is literally the first line.
            +-->
            <exclude>**/node/**</exclude>
            <exclude>**/node_modules/**</exclude>
          </excludes>
          <mapping>
            <tld>XML_STYLE</tld>
          </mapping>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>3.10.0</version>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
            <configuration>
              <doclint>none</doclint>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <!--
      | Used by the continuous integrations server to deploy the project site.
    +-->
    <profile>
      <id>ci-local-site</id>
      <distributionManagement>
        <site>
          <id>ci-local-site</id>
          <url>${jasig-site-ci-dist-base}/resource-server/${project.version}</url>
        </site>
      </distributionManagement>
    </profile>
    <!--
      | Should be activated manually by a developer that wishes to deploy a maven site for
      | the project
    +-->
    <profile>
      <id>manual-site</id>
      <distributionManagement>
        <site>
          <id>developer.jasig</id>
          <url>${jasig-site-dist-base}/resource-server/${project.version}</url>
        </site>
      </distributionManagement>
    </profile>
  </profiles>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>3.5.0</version>
        <configuration>
          <configLocation>google_checks.xml</configLocation>
        </configuration>
      </plugin>
    </plugins>
  </reporting>
</project>
