<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <artifactId>mapow-testing</artifactId>
  <name>mapow-testing</name>
  <description>api for better junit tests</description>
  <version>0.1.0</version>

  <url>https://github.com/katermurr/mapow-maven-bom.git</url>

  <scm>
    <connection>scm:git:git://github.com/katermurr/mapow-testing.git</connection>
    <developerConnection>scm:git:ssh://github.com:katermurr/mapow-testing.git</developerConnection>
    <url>https://github.com/katermurr/mapow-testing.git</url>
    <tag>HEAD</tag>
  </scm>

  <developers>
    <developer>
      <name>mapow</name>
    </developer>
  </developers>

  <licenses>
    <license>
      <name>MIT License</name>
      <url>https://opensource.org/license/mit</url>
    </license>
  </licenses>

  <parent>
    <groupId>eu.mapow</groupId>
    <artifactId>mapow-maven-bom</artifactId>
    <version>1.7</version>
  </parent>

  <properties>
    <java.version>8</java.version>
    <junit5.excludeTags>manually</junit5.excludeTags>

    <!-- dependency  versions -->
    <junit-jupiter.version>5.11.3</junit-jupiter.version>
    <mockito-junit-jupiter.version>5.14.2</mockito-junit-jupiter.version>
    <assertj-core.version>3.26.3</assertj-core.version>
    <instancio-junit.version>5.0.2</instancio-junit.version>
    <lombok.version>1.18.36</lombok.version>
    <logback-classic.version>1.5.12</logback-classic.version>
  </properties>

  <!-- using the mapow-testing with scope test includes all dependencies with scope test -->
  <dependencies>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter</artifactId>
      <version>${junit-jupiter.version}</version>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-junit-jupiter</artifactId>
      <version>${mockito-junit-jupiter.version}</version>
    </dependency>
    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
      <version>${assertj-core.version}</version>
    </dependency>
    <dependency>
      <groupId>org.instancio</groupId>
      <artifactId>instancio-junit</artifactId>
      <version>${instancio-junit.version}</version>
    </dependency>
    <dependency>
      <groupId>org.projectlombok</groupId>
      <artifactId>lombok</artifactId>
      <version>${lombok.version}</version>
    </dependency>
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <version>${logback-classic.version}</version>
    </dependency>
  </dependencies>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>${maven-surefire-plugin.version}</version>
          <configuration>
            <!-- given by jacoco-maven-plugin-->
            <argLine>${surefire.jacoco.args}</argLine>
            <properties>
              <excludeTags>${junit5.excludeTags}</excludeTags>
            </properties>
            <excludedGroups>${junit5.excludeTags}</excludedGroups>
            <excludes>
              <exclude>**/*IntegrationTest*</exclude>
            </excludes>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-failsafe-plugin</artifactId>
          <version>${maven-failsafe-plugin.version}</version>
          <configuration>
            <!-- fix: IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=...) with your test-->
            <!-- https://issues.apache.org/jira/browse/SUREFIRE-1198?focusedCommentId=16674086&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16674086 -->
            <classesDirectory>${project.build.outputDirectory}</classesDirectory>
            <!-- given by jacoco-maven-plugin-->
            <argLine>${failsafe.jacoco.args}</argLine>
            <includes>
              <include>**/*IntegrationTest*</include>
            </includes>
          </configuration>
          <executions>
            <execution>
              <goals>
                <goal>integration-test</goal>
                <goal>verify</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

</project>