<?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>com.github.starnowski.bmunit.extension</groupId>
    <artifactId>parent</artifactId>
    <version>1.1.1</version>
    <packaging>pom</packaging>

    <profiles>
        <profile>
            <id>main</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <modules>
                <module>junit4-rule</module>
                <module>utils</module>
                <module>junit4-rule-demo</module>
                <module>junit4-rule-utils-demo</module>
                <module>junit4-spock-spring-demo</module>
            </modules>
            <properties>
                <org.jboss.byteman.version>3.0.10</org.jboss.byteman.version>
                <junit.junit.version>4.12</junit.junit.version>
            </properties>
        </profile>
        <profile>
            <id>byteman4_compatible</id>
            <modules>
                <module>utils</module>
                <module>junit5-utils-demo</module>
                <module>junit5-spring-demo</module>
            </modules>
            <properties>
                <org.jboss.byteman.version>4.0.10</org.jboss.byteman.version>
                <junit.junit.version>4.12</junit.junit.version>
            </properties>
        </profile>
        <profile>
            <id>native_java_mechanisms</id>
            <modules>
                <module>native-java-testing-approach</module>
                <module>native-java-junit5-testing-approach</module>
            </modules>
            <properties>
                <junit.junit.version>4.12</junit.junit.version>
            </properties>
        </profile>
        <profile>
            <id>sign-artifacts</id>
            <properties>
                <gpg.executable>gpg</gpg.executable>
                <gpg.keyname>${env.GPG_KEYNAME}</gpg.keyname>
                <gpg.passphrase>${env.GPG_PASSPHRASE}</gpg.passphrase>
                <gpg.defaultKeyring>false</gpg.defaultKeyring>
                <gpg.publicKeyring>${env.GPG_DIR}/pubring.gpg</gpg.publicKeyring>
                <gpg.secretKeyring>${env.GPG_DIR}/secring.gpg</gpg.secretKeyring>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.5</version>
                        <configuration>
                            <!-- Prevent gpg from using pinentry programs -->
                            <gpgArguments>
                                <arg>--pinentry-mode</arg>
                                <arg>loopback</arg>
                            </gpgArguments>
                        </configuration>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <url>https://github.com/starnowski/bmunit-extension</url>
    <name>bmunit-extension</name>
    <description>
        The BMUnit-extension is a project which extends the BMUnit library with integration with JUnit library with version 4 and 5.
        It also allows using the BMUnit library with Spock framework.
    </description>

    <licenses>
        <license>
            <name>LGPL 2.1</name>
            <url>http://www.gnu.org/licenses/lgpl-2.1.html</url>
        </license>
    </licenses>
    <developers>
        <developer>
            <name>Szymon Tarnowski</name>
            <url>www.linkedin.com/in/szymon-tarnowski-a104b4150</url>
        </developer>
    </developers>

    <issueManagement>
        <url>https://github.com/starnowski/bmunit-extension/issues</url>
        <system>GitHub Issues</system>
    </issueManagement>

    <scm>
        <url>https://github.com/starnowski/bmunit-extension</url>
        <connection>scm:git:git://github.com/starnowski/bmunit-extension.git</connection>
    </scm>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <spock.core.version>1.1-groovy-2.4</spock.core.version>
        <bmunit.extension.project.version>0.1.0</bmunit.extension.project.version>
        <license.dir>${basedir}</license.dir>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.jboss.byteman</groupId>
                <artifactId>byteman-bmunit</artifactId>
                <version>${org.jboss.byteman.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jboss.byteman</groupId>
                <artifactId>byteman</artifactId>
                <version>${org.jboss.byteman.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jboss.byteman</groupId>
                <artifactId>byteman-submit</artifactId>
                <version>${org.jboss.byteman.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jboss.byteman</groupId>
                <artifactId>byteman-install</artifactId>
                <version>${org.jboss.byteman.version}</version>
            </dependency>
            <dependency>
                <groupId>org.spockframework</groupId>
                <artifactId>spock-core</artifactId>
                <version>${spock.core.version}</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>cobertura-maven-plugin</artifactId>
                <version>2.7</version>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>cobertura</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
        </plugins>
    </reporting>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <!-- The gmavenplus plugin is used to compile Groovy code. To learn more about this plugin,
                    visit https://github.com/groovy/GMavenPlus/wiki -->
                    <groupId>org.codehaus.gmavenplus</groupId>
                    <artifactId>gmavenplus-plugin</artifactId>
                    <version>1.5</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>testCompile</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.22.1</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>cobertura-maven-plugin</artifactId>
                    <version>2.7</version>
                    <configuration>
                        <check/>
                        <formats>
                            <format>html</format>
                            <format>xml</format>
                        </formats>
                        <aggregate>true</aggregate>
                    </configuration>
                    <executions>
                        <execution>
                            <phase>post-integration-test</phase>
                            <goals>
                                <goal>check</goal>
                                <goal>cobertura</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>2.5.3</version>
                    <configuration>
                        <tagNameFormat>v@{project.version}</tagNameFormat>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>com.mycila.maven-license-plugin</groupId>
                    <artifactId>maven-license-plugin</artifactId>
                    <version>1.10.b1</version>
                    <configuration>
                        <header>${license.dir}/license.txt</header>
                        <properties>
                            <project>${project.name}</project>
                            <founder>${project.organization.name}</founder>
                            <year>${project.inceptionYear}</year>
                        </properties>
                        <includes>
                            <include>src/main/java/**</include>
                        </includes>
                        <excludes>
                            <exclude>**/package-info.java</exclude>
                        </excludes>
                    </configuration>
                    <executions>
                        <execution>
                            <goals>
                                <goal>format</goal>
                            </goals>
                            <phase>process-sources</phase>
                        </execution>
                    </executions>
                    <dependencies>
                        <dependency>
                            <groupId>com.mycila</groupId>
                            <artifactId>licenses</artifactId>
                            <version>1</version>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>3.7.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-project-info-reports-plugin</artifactId>
                    <version>3.0.0</version>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <distributionManagement>
        <repository>
            <id>maven-central-starnowski-bmunit-extension</id>
            <name>starnowski-bmunit-extension</name>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
        </repository>
    </distributionManagement>


</project>