<?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.misterspex</groupId>
    <artifactId>misterspex-scientist</artifactId>
    <version>1.0.0</version>
    <packaging>jar</packaging>
    <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>

        <junit.jupiter.version>[5.6.0,6.0.0)</junit.jupiter.version>
        <maven.surefire.version>2.22.2</maven.surefire.version>
        <animal-sniffer-maven-plugin.version>1.18</animal-sniffer-maven-plugin.version>
        <org.codehaus.mojo.signature.java18.version>1.0</org.codehaus.mojo.signature.java18.version>

        <build.site.directory>${project.build.directory}/merged-site</build.site.directory>
        <!-- asciidoctor version -->
        <asciidoctor.maven.plugin.version>1.5.8</asciidoctor.maven.plugin.version>
        <asciidoctorj.diagram.version>1.5.18</asciidoctorj.diagram.version>
        <asciidoctorj.version>2.0.0</asciidoctorj.version>
        <jruby.version>9.2.9.0</jruby.version>
    </properties>

    <name>${project.artifactId}</name>
    <inceptionYear>2020</inceptionYear>
    <description>Execution support and scientist API</description>
    <url>https://github.com/MisterSpex/misterspex-scientist</url>

    <dependencies>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <version>${junit.jupiter.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-params</artifactId>
            <version>${junit.jupiter.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.google.truth</groupId>
            <artifactId>truth</artifactId>
            <version>[1.0,2.0.0)</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>${junit.jupiter.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${maven.surefire.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>2.1</version>
                    <configuration>
                        <archive>
                            <manifest>
                                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                                <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                            </manifest>
                        </archive>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>3.1.0</version>
                    <executions>
                        <execution>
                            <id>attach-sources</id>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>3.1.1</version>
                    <executions>
                         <execution>
                             <id>attach-javadocs</id>
                             <goals>
                                 <goal>jar</goal>
                             </goals>
                             <configuration>
                                 <source>${maven.compiler.source}</source>
                                 <links>
                                     <link>https://docs.oracle.com/javase/8/docs/api/</link>
                                 </links>
                             </configuration>
                         </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.8.1</version>
                    <configuration>
                        <source>${maven.compiler.source}</source>
                        <target>${maven.compiler.target}</target>
                        <optimize>true</optimize>
                    </configuration>
                </plugin>
                <!-- Code Coverage report generation -->
                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>0.8.4</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>prepare-agent</goal>
                                <goal>prepare-agent-integration</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>generate-code-coverage-report</id>
                            <phase>test</phase>
                            <goals>
                                <goal>report</goal>
                                <goal>report-integration</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>3.7.1</version>
                    <configuration>
                        <siteDirectory>${build.site.directory}</siteDirectory>
                        <asciidoc>
                            <sourceDirectory>${build.site.directory}/asciidoc</sourceDirectory>
                            <requires>
                                <require>asciidoctor-diagram</require>
                                <require>base64</require>
                            </requires>
                            <attributes>
                                <imagesdir>images</imagesdir>
                                <imagesoutdir>${project.build.directory}/site/images/</imagesoutdir>
                            </attributes>
                        </asciidoc>
                    </configuration>

                    <dependencies>
                        <dependency><!-- add Asciidoctor Doxia Parser Module -->
                            <groupId>org.asciidoctor</groupId>
                            <artifactId>asciidoctor-maven-plugin</artifactId>
                            <version>${asciidoctor.maven.plugin.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.asciidoctor</groupId>
                            <artifactId>asciidoctorj-diagram</artifactId>
                            <version>${asciidoctorj.diagram.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.jruby</groupId>
                            <artifactId>jruby-complete</artifactId>
                            <version>${jruby.version}</version>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>animal-sniffer-maven-plugin</artifactId>
                    <version>${animal-sniffer-maven-plugin.version}</version>
                    <configuration>
                        <signature>
                            <groupId>org.codehaus.mojo.signature</groupId>
                            <artifactId>java18</artifactId>
                            <version>${org.codehaus.mojo.signature.java18.version}</version>
                        </signature>
                    </configuration>
                    <executions>
                        <execution>
                        <id>animal-sniffer</id>
                        <phase>verify</phase>
                        <goals>
                           <goal>check</goal>
                        </goals>
                    </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>pl.project13.maven</groupId>
                    <artifactId>git-commit-id-plugin</artifactId>
                    <version>4.0.0</version>
                    <executions>
                        <execution>
                            <id>get-the-git-infos</id>
                            <goals>
                                <goal>revision</goal>
                            </goals>
                            <phase>initialize</phase>
                        </execution>
                    </executions>
                    <configuration>
                        <generateGitPropertiesFile>true</generateGitPropertiesFile>
                        <generateGitPropertiesFilename>${project.build.outputDirectory}/META-INF/${project.name}.build.properties</generateGitPropertiesFilename>
                        <dateFormat>yyyyMMdd'T'HHmmssZ</dateFormat>
                        <includeOnlyProperties>
                            <includeOnlyProperty>^git.commit.id.full$</includeOnlyProperty>
                            <includeOnlyProperty>^git.branch$</includeOnlyProperty>
                            <includeOnlyProperty>^git.dirty$</includeOnlyProperty>
                            <includeOnlyProperty>^git.commit.message.short$</includeOnlyProperty>
                            <includeOnlyProperty>^git.commit.id.describe-short$</includeOnlyProperty>
                            <includeOnlyProperty>^git.commit.time$</includeOnlyProperty>
                            <includeOnlyProperty>^git.commit.user.name$</includeOnlyProperty>
                            <includeOnlyProperty>^git.build.time$</includeOnlyProperty>
                            <includeOnlyProperty>^git.build.host$</includeOnlyProperty>
                            <includeOnlyProperty>^git.build.user.name$</includeOnlyProperty>
                            <includeOnlyProperty>^git.build.number$</includeOnlyProperty>
                            <includeOnlyProperty>^git.build.number.unique$</includeOnlyProperty>
                        </includeOnlyProperties>
                        <commitIdGenerationMode>full</commitIdGenerationMode>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>3.1.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-antrun-plugin</artifactId>
                    <version>1.8</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>pl.project13.maven</groupId>
                <artifactId>git-commit-id-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-site</id>
                        <phase>pre-site</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${build.site.directory}</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>${basedir}/src/site</directory>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-readme</id>
                        <phase>pre-site</phase>
                        <configuration>
                            <target>
                                <echo>ANT TASK - copying README.adoc</echo>
                                <copy tofile="${build.site.directory}/asciidoc/index.adoc"
                                      file="${project.basedir}/README.adoc"
                                      overwrite="true">
                                </copy>
                            </target>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

        </plugins>
    </build>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-report-plugin</artifactId>
                <version>3.0.0-M3</version>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <reportSets>
                    <reportSet>
                        <reports>
                            <!-- select non-aggregate reports -->
                            <report>report</report>
                            <report>report-integration</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.1.1</version>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>javadoc</report>
                            <report>aggregate</report>
                        </reports>
                    </reportSet>
                </reportSets>
                <configuration>
                    <failOnError>false</failOnError>
                </configuration>
            </plugin>
        </plugins>
    </reporting>

    <organization>
        <name>Mister Spex GmbH</name>
        <url>http://misterspex.io/</url>
    </organization>

    <developers>
        <developer>
            <name>Sascha Kohlmann</name>
            <id>isk</id>
            <email>sascha.kohlmann [at] misterspex.de</email>
            <roles>
                <role>developer</role>
            </roles>
            <timezone>Europe/Berlin</timezone>
            <properties>
                <picUrl>http://www.gravatar.com/avatar/e3671305f90ec29e364287fc3f8f6cce?d=mm&amp;s=60</picUrl>
            </properties>
        </developer>
    </developers>
    
    <contributors>
        <contributor>
            <name>Dragos Nedelcu</name>
            <timezone>Europe/Berlin</timezone>
            <roles>
                <role>QA</role>
            </roles>
        </contributor>
    </contributors>

    <licenses>
        <license>
            <name>Apache-2.0</name>
            <url>https://apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
        <license>
            <name>GPL-3.0-or-later</name>
            <url>https://www.gnu.org/licenses/gpl-3.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    
    
    <scm>
        <connection>scm:git:git://github.com/MisterSpex/misterspex-scientist.git</connection>
        <developerConnection>scm:git:git@github.com:MisterSpex/misterspex-scientist.git</developerConnection>
        <url>https://github.com/dexecutor/MisterSpex/misterspex-scientist</url>
        <tag>HEAD</tag>
    </scm>

    <issueManagement>
        <system>Github</system>
        <url>https://github.com/MisterSpex/misterspex-scientist/issues</url>
    </issueManagement>
</project>
