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

    Copyright 2017 Adobe. All rights reserved.
    This file is licensed 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 REPRESENTATIONS
    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/xsd/maven-4.0.0.xsd">

  <modelVersion>4.0.0</modelVersion>

  <groupId>com.adobe.event</groupId>
  <artifactId>xdm-event-model</artifactId>
  <version>0.92.5</version>

  <name>Adobe XDM Event Model</name>
  <description>Adobe I/O Event Java (Jackson based) Implementation of the Adobe XDM Event Model</description>
  <url>https://github.com/adobe/xdm-event-model</url>

  <licenses>
    <license>
      <name>The Apache License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
    </license>
  </licenses>

  <!-- required metadata for publishing the Maven artifacts -->
  <organization>
    <name>Adobe</name>
    <url>https://www.adobe.com</url>
  </organization>

  <developers>
    <developer>
      <name>Francois Le Droff</name>
      <email>ledroff@adobe.com</email>
      <organization>Adobe</organization>
      <organizationUrl>https://www.adobe.com</organizationUrl>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:https://github.com/adobe/xdm-event-model.git</connection>
    <developerConnection>scm:git:https://github.com/adobe/xdm-event-model.git</developerConnection>
    <url>https://github.com/adobe/xdm-event-model/tree/master</url>
    <tag>xdm-event-model-0.92.5</tag>
  </scm>

  <distributionManagement>
    <snapshotRepository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
    <repository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
  </distributionManagement>


  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <java.version>11</java.version>
    <maven.compiler.source>${java.version}</maven.compiler.source>
    <maven.compiler.target>${java.version}</maven.compiler.target>
    <jackson.version>2.10.0</jackson.version>
    <javax-validation.version>1.1.0.Final</javax-validation.version>
  </properties>

  <dependencies>

    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-annotations</artifactId>
      <version>${jackson.version}</version>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>javax.validation</groupId>
      <artifactId>validation-api</artifactId>
      <version>${javax-validation.version}</version>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit-dep</artifactId>
      <version>4.11</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest-all</artifactId>
      <version>1.3</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>com.jayway.jsonpath</groupId>
      <artifactId>json-path-assert</artifactId>
      <version>0.9.1</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-log4j12</artifactId>
      <version>1.7.25</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
      <version>${jackson.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>com.mycila</groupId>
        <artifactId>license-maven-plugin</artifactId>
        <!-- Note: run "mvn license:format" to add headers automatically -->
      </plugin>
      <plugin>
        <groupId>org.sonatype.plugins</groupId>
        <artifactId>nexus-staging-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-source-plugin</artifactId>
      </plugin>
    </plugins>

    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>com.mycila</groupId>
          <artifactId>license-maven-plugin</artifactId>
          <version>3.0</version>
          <configuration>
            <header>copyright_header.txt</header>
            <excludes>
              <!-- Exclude third-party libs. -->
              <exclude>**/lib/**</exclude>
              <!-- Exclude .txt files in root generated by the jenkins on the CI server. -->
              <exclude>*.txt</exclude>
              <exclude>*.yml</exclude>
              <exclude>*.properties</exclude>
              <exclude>mvnw</exclude>
              <exclude>mvnw.bat</exclude>
              <exclude>maven/maven-wrapper.properties</exclude>
              <exclude>Dockerfile</exclude>
              <exclude>Dockerfile.build</exclude>
              <exclude>Makefile</exclude>
              <exclude>.github/*</exclude>
            </excludes>
            <mapping>
              <!-- Add license headers to Play Framework routes files-->
              <routes>SCRIPT_STYLE</routes>
              <!-- Add license headers HOCON Scala-style config files-->
              <conf>SCRIPT_STYLE</conf>
              <!-- Use SLASHSTAR rather than JAVADOC style for Java files as the later results in dangling Javadoc issue. -->
              <java>SLASHSTAR_STYLE</java>
            </mapping>
          </configuration>
          <executions>
            <execution>
              <!-- Note: run "mvn license:format" to add headers automatically -->
              <id>check-license</id>
              <phase>validate</phase>
              <goals>
                <goal>check</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>2.2.1</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>2.9.1</version>
          <configuration>
            <source>8</source>
          </configuration>
          <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>1.6</version>
          <executions>
            <execution>
              <id>sign-artifacts</id>
              <phase>verify</phase>
              <goals>
                <goal>sign</goal>
              </goals>
              <configuration>
                <gpgArguments>
                  <arg>--pinentry-mode</arg>
                  <arg>loopback</arg>
                </gpgArguments>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.sonatype.plugins</groupId>
          <artifactId>nexus-staging-maven-plugin</artifactId>
          <version>1.6.8</version>
          <extensions>true</extensions>
          <configuration>
            <autoReleaseAfterClose>true</autoReleaseAfterClose>
            <nexusUrl>
              https://oss.sonatype.org/
            </nexusUrl>
            <serverId>ossrh</serverId>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <profiles>
  <profile>
    <id>release</id>
    <activation>
      <activeByDefault>false</activeByDefault>
    </activation>
    <build>
      <plugins>
        <plugin>
          <artifactId>maven-gpg-plugin</artifactId>
        </plugin>
      </plugins>
    </build>
  </profile>
  </profiles>

</project>

