<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>de.hilling.junit.cdi</groupId>
    <artifactId>cdi-test</artifactId>
    <version>3.2.0</version>
    <packaging>pom</packaging>
    <url>https://github.com/guhilling/cdi-test</url>
    <inceptionYear>2014</inceptionYear>
    <name>CDI Test</name>
    <description>JUnit Add-On for Simple Testing of CDI Components</description>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <java.version>11</java.version>
        <immutables.version>2.8.9-ea-1</immutables.version>
        <deltaspike.version>1.9.5</deltaspike.version>
        <cdi-2.0-weld.version>3.1.0.Final</cdi-2.0-weld.version>
        <smallrye.version>1.4.1</smallrye.version>
        <cdi-api.version>2.0.SP1</cdi-api.version>
        <github.global.server>github</github.global.server>
        <mockito.version>3.12.4</mockito.version>
        <javassist.version>3.28.0-GA</javassist.version>
        <hamcrest.version>2.2</hamcrest.version>
        <junit.jupiter.version>5.8.1</junit.jupiter.version>
        <annotation-literal.version>1.0.11</annotation-literal.version>
    </properties>

    <scm>
        <connection>scm:git:https://github.com/guhilling/cdi-test.git</connection>
        <developerConnection>scm:git:https://github.com/guhilling/cdi-test.git</developerConnection>
        <url>https://github.com/guhilling/cdi-test.git</url>
        <tag>cdi-test-3.2.0</tag>
    </scm>

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

    <issueManagement>
        <system>GitHub Issues</system>
        <url>https://github.com/guhilling/cdi-test/issues</url>
    </issueManagement>

    <ciManagement>
        <system>GitHub Actions</system>
        <url>https://github.com/guhilling/cdi-test/actions</url>
        <notifiers />
    </ciManagement>

    <developers>
        <developer>
            <name>Gunnar Hilling</name>
            <id>gunnar</id>
            <email>cdi-test@hilling.de</email>
            <organization>Hilling IT GmbH</organization>
            <timezone>+1</timezone>
            <roles>
                <role>architect</role>
                <role>committer</role>
            </roles>
        </developer>
    </developers>

    <modules>
        <module>docs</module>
        <module>cdi-test-core</module>
        <module>cdi-test-api</module>
        <module>cdi-test-jee</module>
        <module>cdi-test-microprofile</module>
        <module>integration-tests</module>
    </modules>

    <dependencyManagement>
        <dependencies>
            <!-- testing -->
            <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter</artifactId>
                <version>${junit.jupiter.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter-api</artifactId>
                <version>${junit.jupiter.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest-library</artifactId>
                <version>${hamcrest.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest-core</artifactId>
                <version>${hamcrest.version}</version>
                <scope>test</scope>
            </dependency>
            <!-- internal -->
            <dependency>
                <groupId>de.hilling.junit.cdi</groupId>
                <artifactId>cdi-test-core</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>de.hilling.junit.cdi</groupId>
                <artifactId>cdi-test-jee</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>de.hilling.junit.cdi</groupId>
                <artifactId>cdi-test-microprofile</artifactId>
                <version>${project.version}</version>
            </dependency>
            <!-- utils -->
            <dependency>
                <groupId>org.javassist</groupId>
                <artifactId>javassist</artifactId>
                <version>${javassist.version}</version>
            </dependency>
            <dependency>
                <groupId>org.immutables</groupId>
                <artifactId>value</artifactId>
                <version>${immutables.version}</version>
                <scope>provided</scope>
            </dependency>
            <!-- provided -->
            <dependency>
                <groupId>javax.enterprise</groupId>
                <artifactId>cdi-api</artifactId>
                <version>${cdi-api.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>javax.annotation</groupId>
                <artifactId>javax.annotation-api</artifactId>
                <version>1.3.2</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>${mockito.version}</version>
                <scope>compile</scope>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-junit-jupiter</artifactId>
                <version>${mockito.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.deltaspike.cdictrl</groupId>
                <artifactId>deltaspike-cdictrl-api</artifactId>
                <version>${deltaspike.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.deltaspike.core</groupId>
                <artifactId>deltaspike-core-api</artifactId>
                <version>${deltaspike.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.deltaspike.core</groupId>
                <artifactId>deltaspike-core-impl</artifactId>
                <version>${deltaspike.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.deltaspike.cdictrl</groupId>
                <artifactId>deltaspike-cdictrl-weld</artifactId>
                <version>${deltaspike.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jboss.weld</groupId>
                <artifactId>weld-core-bom</artifactId>
                <version>${weld.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-entitymanager</artifactId>
                <version>5.5.7.Final</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-jdk14</artifactId>
                <version>1.7.32</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

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

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.5.3</version>
                <configuration>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <useReleaseProfile>true</useReleaseProfile>
                    <releaseProfiles>release,cdi-2</releaseProfiles>
                    <goals>deploy</goals>
                </configuration>
            </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-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.3.1</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <configuration>
                            <additionalOptions>
                            </additionalOptions>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>0.8.7</version>
                <executions>
                    <execution>
                        <id>prepare-agent</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>report</id>
                        <goals>
                            <goal>report-aggregate</goal>
                        </goals>
                        <phase>verify</phase>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.jboss.jandex</groupId>
                <artifactId>jandex-maven-plugin</artifactId>
                <version>1.2.0</version>
                <executions>
                    <execution>
                        <id>make-index</id>
                        <goals>
                            <goal>jandex</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.22.2</version>
                <configuration>
                    <threadCount>6</threadCount>
                </configuration>
            </plugin>
        </plugins>
        <pluginManagement>
            <plugins>
                <plugin>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>2.8.2</version>
                </plugin>
                <plugin>
                    <groupId>org.sonatype.plugins</groupId>
                    <artifactId>nexus-staging-maven-plugin</artifactId>
                    <version>1.6.8</version>
                    <extensions>true</extensions>
                    <configuration>
                        <serverId>ossrh</serverId>
                        <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                        <autoReleaseAfterClose>true</autoReleaseAfterClose>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.sonarsource.scanner.maven</groupId>
                    <artifactId>sonar-maven-plugin</artifactId>
                    <version>3.9.0.2155</version>
                </plugin>
                <plugin>
                    <artifactId>maven-war-plugin</artifactId>
                    <version>3.3.2</version>
                    <configuration>
                        <failOnMissingWebXml>false</failOnMissingWebXml>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <profiles>
        <profile>
            <id>cdi-2</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <properties>
                <weld.version>3.1.5.Final</weld.version>
            </properties>
        </profile>
        <profile>
            <id>release</id>
            <properties>
                <weld.version>${cdi-2.0-weld.version}</weld.version>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>3.0.1</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-enforcer-plugin</artifactId>
                        <version>3.0.0</version>
                        <executions>
                            <execution>
                                <id>enforce-versions</id>
                                <goals>
                                    <goal>enforce</goal>
                                </goals>
                                <configuration>
                                    <rules>
                                        <requireMavenVersion>
                                            <version>3.6</version>
                                        </requireMavenVersion>
                                        <requireJavaVersion>
                                            <version>11</version>
                                        </requireJavaVersion>
                                    </rules>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>com.github.github</groupId>
                        <artifactId>site-maven-plugin</artifactId>
                        <version>0.12</version>
                        <configuration>
                            <message>Creating site for ${project.version}</message>
                        </configuration>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>site</goal>
                                </goals>
                                <phase>site</phase>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
