<?xml version="1.0" encoding="UTF-8"?>

<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>

  <groupId>no.polaric</groupId>
  <artifactId>polaric-core</artifactId>
  <version>1.0.2</version>
  <packaging>jar</packaging>

  <name>Polaric Core</name>
  <description>
    Polaric-Core is a general framework for creating secure REST/websocket servers.
  </description>
  <url>https://github.com/PolaricServer/Polaric-Core</url>

  <licenses>
    <license>
      <name>GNU Affero General Public License v3</name>
      <url>https://www.gnu.org/licenses/agpl-3.0.html</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <scm>
    <url>https://github.com/PolaricServer/Polaric-Core</url>
    <connection>scm:git:https://github.com/PolaricServer/Polaric-Core.git</connection>
    <developerConnection>scm:git:git@github.com:PolaricServer/Polaric-Core.git</developerConnection>
    <tag>HEAD</tag>
  </scm>
  
  <developers>
    <developer>
      <id>ohanssen</id>
      <name>Øyvind Hanssen</name>
      <email>ohanssen@acm.org</email>
      <url>https://github.com/ohanssen</url>
    </developer>
  </developers>

  
  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.source>17</maven.compiler.source>
    <maven.compiler.target>17</maven.compiler.target>
  </properties>

  <dependencies>
    <dependency>
      <groupId>io.javalin</groupId>
      <artifactId>javalin</artifactId>
      <version>6.7.0</version>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-annotations</artifactId>
      <version>2.17.0</version>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-simple</artifactId>
      <version>2.0.16</version>
    </dependency>
    <dependency>
      <groupId>org.pac4j</groupId>
      <artifactId>javalin-pac4j</artifactId>
      <version>7.0.0</version>
    </dependency>
    <dependency>
      <groupId>org.pac4j</groupId>
      <artifactId>pac4j-core</artifactId>
      <version>6.1.1</version>
    </dependency>
    <dependency>
      <groupId>org.pac4j</groupId>
      <artifactId>pac4j-http</artifactId>
      <version>6.1.1</version>
    </dependency>
    <dependency>
      <groupId>org.pac4j</groupId>
      <artifactId>pac4j-oauth</artifactId>
      <version>6.1.1</version>
    </dependency>
    <dependency>
      <groupId>net.cinnom</groupId>
      <artifactId>nano-cuckoo</artifactId>
      <version>3.0.2</version>
    </dependency>
    <dependency>
      <groupId>javax.jmdns</groupId>
      <artifactId>jmdns</artifactId>
      <version>3.4.1</version>
    </dependency>
  </dependencies>

  <build>
    <sourceDirectory>src</sourceDirectory>
    <plugins>
      
      <!-- Compile Java sources -->
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.8.0</version>
      </plugin>
      
      <!-- Main JAR -->
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <version>3.0.2</version>
      </plugin>
      
      <!-- Sources JAR -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>3.3.0</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <!-- Javadoc JAR -->

    </plugins>
  </build>

  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>3.6.2</version>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <sourcepath>src:src/auth:src/httpd:src/util</sourcepath>
              <source>17</source>
              <target>17</target>
            </configuration>
          </plugin>
        
          <!-- GPG signing only enabled in release profile -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>3.1.0</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          
        </plugins>
      </build>
    </profile>
  </profiles>

</project>
