<?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>io.jexxa.addendj</groupId>
  <artifactId>AddendJ</artifactId>
  <version>1.0.0</version>

  <!-- Project Information -->
  <name>AddendJ</name>
  <url>https://addendj.jexxa.io</url>
  <description>AddendJ - Cross cutting concerns for Domain Driven Design</description>
  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <developers>
    <developer>
      <name>Michael Repplinger</name>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:https://github.com/repplix/AddendJ.git</connection>
    <url>http://github.com/repplix/AddendJ</url>
    <developerConnection>scm:git:https://github.com/repplix/AddendJ.git</developerConnection>
    <tag>AddendJ-1.0.0</tag>
  </scm>
  
  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.release>11</maven.compiler.release>
    <maven.compliance.level>1.11</maven.compliance.level>
    <aspectj-maven-plugin.version>1.12.6</aspectj-maven-plugin.version>
    <maven.jacoco.plugin>0.8.5</maven.jacoco.plugin>
    
    <addend.version>1.0</addend.version>
    <aspectjtools.version>1.9.5</aspectjtools.version>
    <aspectjrt.version>1.9.5</aspectjrt.version>

    <junit.platform.launcher.version>1.7.0-M1</junit.platform.launcher.version>
    <junit.jupiter.engine.version>5.7.0-M1</junit.jupiter.engine.version>
    <junit.jupiter.params.version>5.7.0-M1</junit.jupiter.params.version>
    
    <!-- sonar configuration  -->
    <sonar.organization>repplix</sonar.organization>
    <sonar.host.url>https://sonarcloud.io</sonar.host.url>
    <sonar.login>${sonar-login}</sonar.login>
    <sonar.java.source>1.11</sonar.java.source>
    <sonar.coverage.jacoco.xmlReportPaths>target/site/jacoco/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>

    <!--version of  maven plugins  -->
    <gpg.plugin.version>1.6</gpg.plugin.version>
    <maven.clean.plugin>3.1.0</maven.clean.plugin>
    <maven.compiler.plugin>3.8.1</maven.compiler.plugin>
    <maven.deploy.plugin>3.0.0-M1</maven.deploy.plugin>
    <maven.install.plugin>3.0.0-M1</maven.install.plugin>
    <maven.jar.plugin>3.2.0</maven.jar.plugin>
    <maven.resources.plugin>3.1.0</maven.resources.plugin>
    <maven.site.plugin>3.9.0</maven.site.plugin>
    <maven.release.plugin>3.0.0-M1</maven.release.plugin>

  </properties>

  <dependencies>
    <!-- dependencies for tests -->
    <dependency>
      <groupId>org.junit.platform</groupId>
      <artifactId>junit-platform-launcher</artifactId>
      <version>${junit.platform.launcher.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-engine</artifactId>
      <version>${junit.jupiter.engine.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-params</artifactId>
      <version>${junit.jupiter.params.version}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>io.jexxa.addend</groupId>
      <artifactId>Addend</artifactId>
      <version>${addend.version}</version>
    </dependency>
    <dependency>
      <groupId>org.aspectj</groupId>
      <artifactId>aspectjtools</artifactId>
      <version>${aspectjtools.version}</version>
    </dependency>
    <dependency>
      <groupId>org.aspectj</groupId>
      <artifactId>aspectjrt</artifactId>
      <version>${aspectjrt.version}</version>
    </dependency>
  </dependencies>

  <repositories>
    <repository>
      <id>central</id>
      <url>https://repo1.maven.org/maven2</url>
      <releases><enabled>true</enabled></releases>
      <snapshots><enabled>true</enabled></snapshots>
    </repository>
  </repositories>


  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>com.nickwongdev</groupId>
          <artifactId>aspectj-maven-plugin</artifactId>
          <version>${aspectj-maven-plugin.version}</version>
        </plugin>
        <!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
        <plugin>
          <artifactId>maven-clean-plugin</artifactId>
          <version>3.1.0</version>
        </plugin>
        <!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
        <plugin>
          <artifactId>maven-resources-plugin</artifactId>
          <version>3.1.0</version>
        </plugin>
        <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.8.1</version>
        </plugin>
        <plugin>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>3.0.0-M4</version>
        </plugin>
        <plugin>
          <artifactId>maven-jar-plugin</artifactId>
          <version>3.2.0</version>
        </plugin>
        <plugin>
          <artifactId>maven-install-plugin</artifactId>
          <version>3.0.0-M1</version>
        </plugin>
        <plugin>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>3.0.0-M1</version>
        </plugin>
        <!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
        <plugin>
          <artifactId>maven-site-plugin</artifactId>
          <version>3.9.0</version>
        </plugin>
        <plugin>
          <artifactId>maven-project-info-reports-plugin</artifactId>
          <version>3.1.0</version>
        </plugin>

      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <artifactId>maven-release-plugin</artifactId>
        <configuration>
          <releaseProfiles>sign-artifacts</releaseProfiles>
          <arguments>-Psign-artifacts</arguments>
        </configuration>
      </plugin>
      <plugin>
      <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>${maven.jacoco.plugin}</version>
        <executions>
          <execution>
            <id>default-prepare-agent</id>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
          <execution>
            <id>default-report</id>
            <goals>
              <goal>report</goal>
            </goals>
          </execution>
          <execution>
            <id>default-check</id>
            <goals>
              <goal>check</goal>
            </goals>
            <configuration>
              <rules>
                <rule>
                  <element>BUNDLE</element>
                  <limits>
                    <limit>
                      <counter>COMPLEXITY</counter>
                      <value>COVEREDRATIO</value>
                      <minimum>0.60</minimum>
                    </limit>
                  </limits>
                </rule>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <!-- Dient zur Generierung der Datei *Aspect.class -->
        <groupId>com.nickwongdev</groupId>
        <artifactId>aspectj-maven-plugin</artifactId>
        <configuration>
          <source>${maven.compiler.release}</source>
          <target>${maven.compiler.release}</target>
          <complianceLevel>${maven.compliance.level}</complianceLevel>
          <XaddSerialVersionUID>true</XaddSerialVersionUID>
          <showWeaveInfo>true</showWeaveInfo>
          <verbose>true</verbose>
          <encoding>${project.build.sourceEncoding}</encoding>
        </configuration>
        <executions>
          <execution>
            <phase>process-sources</phase>
            <goals>
              <goal>compile</goal>
            </goals>
          </execution>
          <execution>
            <id>compile</id>
            <goals>

              <goal>test-compile</goal>
            </goals>
            <configuration>
              <complianceLevel>${maven.compiler.release}</complianceLevel>
              <source>${maven.compiler.release}</source>
              <target>${maven.compiler.release}</target>
              <XaddSerialVersionUID>true</XaddSerialVersionUID>
              <showWeaveInfo>true</showWeaveInfo>
              <verbose>true</verbose>
              <encoding>${project.build.sourceEncoding}</encoding>
            </configuration>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjtools</artifactId>
            <version>${aspectjrt.version}</version>
          </dependency>
        </dependencies>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>3.2.0</version>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
              <goal>javadoc-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>3.2.1</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar</goal>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-gpg-plugin</artifactId>
        <version>${gpg.plugin.version}</version>
      </plugin>

    </plugins>
  </build>

  <distributionManagement>
    <snapshotRepository>
      <id>oss.sonatype.org</id>
      <name>AddendJ snapshot</name>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
      <uniqueVersion>true</uniqueVersion>
    </snapshotRepository>
    <repository>
      <id>oss.sonatype.org</id>
      <name>AddendJ Maven Packages</name>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
      <uniqueVersion>true</uniqueVersion>
    </repository>
  </distributionManagement>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <reportSets>
          <reportSet>
            <reports>
              <!-- select non-aggregate reports -->
              <report>report</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
    </plugins>
  </reporting>
</project>
