<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>
   <artifactId>weld-junit-parent</artifactId>
   <packaging>pom</packaging>
   <version>2.0.1.Final</version>

   <name>Weld JUnit Extensions</name>
   <description>Set of JUnit extensions to enhance the testing of CDI components.</description>

   <parent>
      <groupId>org.jboss.weld</groupId>
      <artifactId>weld-parent</artifactId>
      <version>37</version>
   </parent>

   <url>http://weld.cdi-spec.org</url>
   <licenses>
      <license>
         <name>Apache License, Version 2.0</name>
         <distribution>repo</distribution>
         <url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
      </license>
   </licenses>

   <scm>
      <connection>scm:git:git://github.com:weld/weld-junit.git</connection>
      <developerConnection>scm:git:git@github.com:weld/weld-junit.git</developerConnection>
      <url>https://github.com/weld/weld-junit</url>
     <tag>2.0.1.Final</tag>
  </scm>

   <developers>
      <developer>
         <name>Weld committers</name>
      </developer>
   </developers>

   <properties>
      <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
      <maven.compiler.source>1.8</maven.compiler.source>
      <maven.compiler.target>1.8</maven.compiler.target>
      <!-- Versions -->
      <version.junit4>4.12</version.junit4>
      <version.junit.jupiter>5.4.1</version.junit.jupiter>
      <version.weld>3.1.2.Final</version.weld>
      <version.mockito>2.25.1</version.mockito>
      <version.jboss-ejb-api>1.0.0.Final</version.jboss-ejb-api>
      <version.hibernate-jpa-api>1.0.0.Final</version.hibernate-jpa-api>
      <!-- SpotBugs properties -->
      <version.spotbugs>3.1.11</version.spotbugs>
      <version.spotbugs.plugin>3.1.10</version.spotbugs.plugin>
      <spotbugs.failOnError>false</spotbugs.failOnError>
      <spotbugs.threshold>Low</spotbugs.threshold>
   </properties>

   <modules>
      <module>junit4</module>
      <module>junit5</module>
      <module>junit-common</module>
   </modules>

   <dependencyManagement>

      <dependencies>

         <dependency>
            <groupId>org.jboss.weld.se</groupId>
            <artifactId>weld-se-core</artifactId>
            <version>${version.weld}</version>
         </dependency>

         <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${version.junit4}</version>
         </dependency>

         <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <version>${version.junit.jupiter}</version>
         </dependency>

         <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>${version.junit.jupiter}</version>
         </dependency>

         <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>${version.mockito}</version>
            <scope>test</scope>
         </dependency>

         <dependency>
            <groupId>org.jboss.weld</groupId>
            <artifactId>weld-junit-common</artifactId>
            <version>${project.version}</version>
         </dependency>

         <dependency>
            <groupId>org.jboss.spec.javax.ejb</groupId>
            <artifactId>jboss-ejb-api_3.2_spec</artifactId>
            <version>${version.jboss-ejb-api}</version>
            <scope>test</scope>
         </dependency>

         <dependency>
            <groupId>org.hibernate.javax.persistence</groupId>
            <artifactId>hibernate-jpa-2.1-api</artifactId>
            <version>${version.hibernate-jpa-api}</version>
            <optional>true</optional>
         </dependency>

         <dependency>
            <groupId>com.github.spotbugs</groupId>
            <artifactId>spotbugs-annotations</artifactId>
            <version>${version.spotbugs}</version>
            <optional>true</optional>
         </dependency>
      </dependencies>

   </dependencyManagement>

   <profiles>
       <profile>
           <id>spotbugs</id>
           <activation>
               <activeByDefault>false</activeByDefault>
               <property>
                   <name>env.WELD_JUNIT_DEBUG</name>
                   <value>spotbugs</value>
               </property>
           </activation>
           <build>
               <plugins>
                   <plugin>
                       <groupId>com.github.spotbugs</groupId>
                       <artifactId>spotbugs-maven-plugin</artifactId>
                       <version>${version.spotbugs.plugin}</version>
                       <configuration>
                           <effort>Max</effort>
                           <xmlOutput>true</xmlOutput>
                           <threshold>${spotbugs.threshold}</threshold>
                           <failOnError>${spotbugs.failOnError}</failOnError>
                       </configuration>
                       <executions>
                           <execution>
                               <goals>
                                   <goal>check</goal>
                               </goals>
                           </execution>
                       </executions>
                   </plugin>
               </plugins>
           </build>
       </profile>
   </profiles>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <!--Minimal version with Junit 5 engine support-->
                    <version>2.22.1</version>
                    <configuration>
                        <systemProperties>
                            <property>
                                <name>java.util.logging.config.file</name>
                                <value>${project.build.testOutputDirectory}/logging.properties</value>
                            </property>
                        </systemProperties>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

</project>
