<?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>org.sonarsource.owasp</groupId>
        <artifactId>sonar-zap</artifactId>
        <version>1.2.0</version>
        <relativePath>..</relativePath>
    </parent>
    <artifactId>sonar-zap-plugin</artifactId>
    <packaging>sonar-plugin</packaging>
    <name>ZAP Plugin for SonarQube</name>
    <url>https://www.owasp.org/index.php/OWASP_Zed_Attack_Proxy_Project</url>

    <properties>
        <sonar.version>7.9.1</sonar.version>
        <sonar.pluginClass>org.sonar.zaproxy.ZapPlugin</sonar.pluginClass>
        <sonar.pluginName>ZAP</sonar.pluginName>

        <commons.io.version>2.6</commons.io.version>
        <commons.lang.version>2.6</commons.lang.version>
        <jsr305.version>3.0.2</jsr305.version>
        <staxmate.version>2.3.1</staxmate.version>

        <junit.version>4.12</junit.version>
        <mockito.version>2.28.2</mockito.version>
        <fest.assert.version>1.4</fest.assert.version>

        <dockerfile.maven.plugin.version>1.4.10</dockerfile.maven.plugin.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.sonarsource.sonarqube</groupId>
            <artifactId>sonar-plugin-api</artifactId>
            <version>${sonar.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>${commons.io.version}</version>
        </dependency>
        <dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
            <version>${commons.lang.version}</version>
        </dependency>
        <dependency>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>jsr305</artifactId>
            <version>${jsr305.version}</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.staxmate</groupId>
            <artifactId>staxmate</artifactId>
            <version>${staxmate.version}</version>
        </dependency>

        <!-- unit tests -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.easytesting</groupId>
            <artifactId>fest-assert</artifactId>
            <version>${fest.assert.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>${mockito.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>docker</id>
            <activation>
                <property>
                    <name>docker</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.spotify</groupId>
                        <artifactId>dockerfile-maven-plugin</artifactId>
                        <version>${dockerfile.maven.plugin.version}</version>
                        <executions>
                            <execution>
                                <id>default</id>
                                <goals>
                                    <goal>build</goal>
                                    <goal>push</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <repository>${project.groupId}/${project.artifactId}</repository>
                            <tag>${project.version}</tag>
                            <buildArgs>
                                <SONAR_VERSION>${sonar.version}-community</SONAR_VERSION>
                                <ARTIFACT>${project.build.finalName}.jar</ARTIFACT>
                            </buildArgs>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
