<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">
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.5.4</version>
        <relativePath /> <!-- lookup parent from repository -->
    </parent>

    <modelVersion>4.0.0</modelVersion>
    <groupId>edu.iu.uits.lms</groupId>
    <artifactId>lms-canvas-lti-framework</artifactId>
    <packaging>jar</packaging>
    <version>5.0.3</version>
    <name>LMS Canvas LTI Framework Services</name>
    <description>Shared services for the lms-canvas LTI tools around the LTI tool launch</description>
    <url>https://github.com/indiana-university/lms-canvas-lti-framework</url>
    <inceptionYear>2015</inceptionYear>

    <organization>
        <name>Indiana University</name>
        <url>https://iu.edu</url>
    </organization>

    <developers>
        <developer>
            <name>Learning Management Systems Team</name>
            <email>lmsreq@iu.edu</email>
            <organization>Indiana University</organization>
            <organizationUrl>https://iu.edu</organizationUrl>
        </developer>
    </developers>

    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/indiana-university/lms-canvas-lti-framework/issues</url>
    </issueManagement>

    <licenses>
        <license>
            <name>BSD 3-Clause License</name>
            <url>https://opensource.org/licenses/BSD-3-Clause</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <distributionManagement>
        <repository>
            <name>Sonatype OSS Repository</name>
            <id>Sonatype-OSS</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
        </repository>
        <snapshotRepository>
            <name>Sonatype OSS Snapshot Repository</name>
            <id>Sonatype-OSS</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
    </distributionManagement>

    <scm>
        <connection>scm:git:https://github.com/indiana-university/lms-canvas-lti-framework.git</connection>
        <developerConnection>scm:git:https://github.com/indiana-university/lms-canvas-lti-framework.git</developerConnection>
        <url>https://github.com/indiana-university/lms-canvas-lti-framework</url>
        <tag>lms-canvas-lti-framework-5.0.3</tag>
    </scm>

    <properties>
        <basiclti-util.version>21.1</basiclti-util.version>
        <hibernate5-ddl-maven-plugin.version>2.3.0</hibernate5-ddl-maven-plugin.version>
        <httpclient.version>4.5.13</httpclient.version>
        <java.version>11</java.version>
<!--        <jdk.source>11</jdk.source>-->
<!--        <jdk.target>11</jdk.target>-->
        <lms-canvas-common-configuration.version>5.0.2</lms-canvas-common-configuration.version>
        <plugins.compiler.version>3.8.1</plugins.compiler.version>
        <plugins.gpg.version>1.6</plugins.gpg.version>
        <plugins.javadoc.version>3.0.1</plugins.javadoc.version>
        <plugins.license.version>2.0.0</plugins.license.version>
        <plugins.nexus-staging.version>1.6.8</plugins.nexus-staging.version>
        <plugins.release.version>2.5.3</plugins.release.version>
        <plugins.source.version>3.0.1</plugins.source.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.sakaiproject.basiclti</groupId>
            <artifactId>basiclti-util</artifactId>
            <version>${basiclti-util.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <version>${httpclient.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>
        <dependency>
            <groupId>edu.iu.uits.lms</groupId>
            <artifactId>lms-canvas-common-configuration</artifactId>
            <version>${lms-canvas-common-configuration.version}</version>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>de.jpdigital</groupId>
                <artifactId>hibernate54-ddl-maven-plugin</artifactId>
                <version>${hibernate5-ddl-maven-plugin.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>gen-ddl</goal>
                        </goals>
                        <phase>process-classes</phase>
                    </execution>
                </executions>
                <configuration>
                    <dialects>
                        <param>h2</param>
                        <param>postgresql9</param>
                    </dialects>
                    <packages>
                        <param>edu.iu.uits.lms.lti</param>
                    </packages>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${plugins.compiler.version}</version>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>${plugins.license.version}</version>
                <configuration>
                    <licenseName>bsd_3</licenseName>
                    <failOnMissingHeader>true</failOnMissingHeader>
                    <failOnNotUptodateHeader>true</failOnNotUptodateHeader>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>${maven-jar-plugin.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>test-jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>${plugins.nexus-staging.version}</version>
                <extensions>true</extensions>
                <configuration>
                    <serverId>Sonatype-OSS</serverId>
                    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>${plugins.release.version}</version>
                <configuration>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <useReleaseProfile>false</useReleaseProfile>
                    <releaseProfiles>release</releaseProfiles>
                    <goals>deploy</goals>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>${plugins.source.version}</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>${plugins.javadoc.version}</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>${plugins.gpg.version}</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
