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

  <parent>
    <groupId>org.camunda</groupId>
    <artifactId>camunda-release-parent</artifactId>
    <version>4.1.1</version>
    <!-- do not remove empty tag - https://issues.apache.org/jira/browse/MNG-4687 -->
    <relativePath />
  </parent>

  <groupId>org.camunda.bpm</groupId>
  <artifactId>camunda-license-check</artifactId>
  <name>camunda BPM EE - License Management - License check</name>
  <inceptionYear>2017</inceptionYear>
  <version>2.11.2</version>

  <properties>
    <nexus.snapshot.repository>https://artifacts.camunda.com/artifactory/camunda-bpm-snapshots/
    </nexus.snapshot.repository>
    <nexus.release.repository>https://artifacts.camunda.com/artifactory/camunda-bpm/
    </nexus.release.repository>
    <skip.central.release>true</skip.central.release>
    <skip.surefire.tests>${skipTests}</skip.surefire.tests>
    <license.inlineHeader>
Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
under one or more contributor license agreements. Licensed under a commercial license.
You may not use this file except in compliance with the commercial license.</license.inlineHeader>

    <version.java>1.8</version.java>
    <version.commonds.codec>1.15</version.commonds.codec>
    <version.slf4j>1.7.36</version.slf4j>
    <version.logback>1.2.13</version.logback>
    <version.junit>4.13.2</version.junit>
    <version.hamcrest>1.3</version.hamcrest>

  </properties>

  <dependencies>
    <dependency>
      <groupId>commons-codec</groupId>
      <artifactId>commons-codec</artifactId>
      <version>${version.commonds.codec}</version>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>${version.slf4j}</version>
    </dependency>

    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <version>${version.logback}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>${version.junit}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest-library</artifactId>
      <version>${version.hamcrest}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.22.2</version>
          <configuration>
            <skipTests>${skip.surefire.tests}</skipTests>
          </configuration>
        </plugin>
        <plugin>
          <groupId>com.mycila</groupId>
          <artifactId>license-maven-plugin</artifactId>
          <version>3.0</version>
          <configuration>
            <skipExistingHeaders>false</skipExistingHeaders>
            <includes>
              <include>**/*.java</include>
            </includes>
            <mapping>
              <java>SLASHSTAR_STYLE</java>
            </mapping>
          </configuration>
          <executions>
            <execution>
              <id>add-license-header</id>
              <phase>compile</phase>
              <goals>
                <goal>format</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <artifactId>maven-source-plugin</artifactId>
        <executions>
          <execution>
            <!-- this removes the test-sources.jar generation which contains sensitive Camunda unlimited licenses -->
            <id>attach-test-sources</id>
            <phase>none</phase>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>3.4.1</version>
        <executions>
          <execution>
            <id>no-test-sources-jar</id>
            <phase>verify</phase>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireFilesDontExist>
                  <message>
                    The artifact "${project.build.finalName}-test-sources.jar" must not be published to Maven Central since it contains sensitive Camunda unlimited licenses.
                  </message>
                  <files>
                    <file>${project.build.directory}/${project.build.finalName}-test-sources.jar</file>
                  </files>
                </requireFilesDontExist>
              </rules>
              <fail>true</fail>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <scm>
    <url>https://github.com/camunda/camunda-license-check</url>
    <connection>scm:git:git@github.com:camunda/camunda-license-check.git</connection>
    <developerConnection>scm:git:git@github.com:camunda/camunda-license-check.git</developerConnection>
    <tag>2.11.2</tag>
  </scm>

</project>
