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

    <parent>
        <groupId>guru.nidi</groupId>
        <artifactId>code-assert-parent</artifactId>
        <version>0.9.13</version>
    </parent>

    <artifactId>code-assert</artifactId>
    <name>${project.artifactId}</name>

    <properties>
        <module.name>guru.nidi.codeassert</module.name>
        <checkstyle.version>6.19</checkstyle.version>
        <findbugs.version>3.1.12</findbugs.version>
        <findsecbugs.version>1.9.0</findsecbugs.version>
        <pmd.version>5.8.1</pmd.version>
        <kotlin.version>1.3.71</kotlin.version>
        <detekt.version>1.9.1</detekt.version>
        <ktlint.version>0.36.0</ktlint.version>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>guru.nidi</groupId>
                <artifactId>code-assert-maven-plugin</artifactId>
                <version>0.9.6</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>prepare</goal>
                            <goal>assert</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>guru.nidi.maven.plugins</groupId>
                <artifactId>snippets-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>snippets</goal>
                        </goals>
                        <configuration>
                            <inputs>
                                <input>
                                    src/test/java/guru/nidi/codeassert/snippets
                                </input>
                            </inputs>
                            <outputs>
                                <output>../README.md</output>
                            </outputs>
                            <prefix>\n```java</prefix>
                            <postfix>```\n</postfix>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.jetbrains.kotlin</groupId>
                <artifactId>kotlin-maven-plugin</artifactId>
                <version>${kotlin.version}</version>
                <executions>
                    <execution>
                        <id>test-compile</id>
                        <goals>
                            <goal>test-compile</goal>
                        </goals>
                        <configuration>
                            <sourceDirs>
                                <sourceDir>src/test/kotlin</sourceDir>
                            </sourceDirs>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>guru.nidi</groupId>
            <artifactId>code-assert-core</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>com.github.spotbugs</groupId>
            <artifactId>spotbugs</artifactId>
            <version>${findbugs.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.ow2.asm</groupId>
                    <artifactId>asm-debug-all</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.h3xstream.findsecbugs</groupId>
            <artifactId>findsecbugs-plugin</artifactId>
            <version>${findsecbugs.version}</version>
        </dependency>
        <dependency>
            <groupId>net.sourceforge.pmd</groupId>
            <artifactId>pmd-java</artifactId>
            <version>${pmd.version}</version>
        </dependency>
        <dependency>
            <groupId>com.puppycrawl.tools</groupId>
            <artifactId>checkstyle</artifactId>
            <version>${checkstyle.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>com.sun</groupId>
                    <artifactId>tools</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>commons-logging</groupId>
                    <artifactId>commons-logging</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jul-to-slf4j</artifactId>
        </dependency>

        <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-stdlib</artifactId>
            <version>${kotlin.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-compiler-embeddable</artifactId>
            <version>${kotlin.version}</version>
        </dependency>

        <dependency>
            <groupId>io.gitlab.arturbosch.detekt</groupId>
            <artifactId>detekt-core</artifactId>
            <version>${detekt.version}</version>
        </dependency>
        <dependency>
            <groupId>io.gitlab.arturbosch.detekt</groupId>
            <artifactId>detekt-rules</artifactId>
            <version>${detekt.version}</version>
        </dependency>

        <dependency>
            <groupId>com.pinterest.ktlint</groupId>
            <artifactId>ktlint-core</artifactId>
            <version>${ktlint.version}</version>
        </dependency>
        <dependency>
            <groupId>com.pinterest.ktlint</groupId>
            <artifactId>ktlint-ruleset-standard</artifactId>
            <version>${ktlint.version}</version>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <repositories>
        <repository>
            <id>arturbosch-code-analysis</id>
            <name>arturbosch-code-analysis (for detekt)</name>
            <url>https://dl.bintray.com/arturbosch/code-analysis/</url>
            <layout>default</layout>
            <releases>
                <enabled>true</enabled>
                <updatePolicy>never</updatePolicy>
            </releases>
            <snapshots>
                <enabled>false</enabled>
                <updatePolicy>never</updatePolicy>
            </snapshots>
        </repository>
    </repositories>
</project>
