<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://maven.apache.org/POM/4.0.0"
         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>io.github.ndviet</groupId>
        <artifactId>test-parent-pom</artifactId>
        <version>1.0.0-SNAPSHOT</version>
        <relativePath>../test-parent-pom/pom.xml</relativePath>
    </parent>

    <artifactId>test-webdriver-downloader</artifactId>
    <name>Test WebDriver Downloader</name>
    <version>${revision}</version>
    <description>Utility to download WebDriver for Selenium test execution.</description>
    <url>https://github.com/${github.organization}/${project.artifactId}/tree/master</url>
    <packaging>pom</packaging>

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

    <developers>
        <developer>
            <id>${github.id}</id>
            <name>${github.name}</name>
            <email>${github.email}</email>
            <roles>
                <role>maintainer</role>
                <role>developer</role>
            </roles>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:git@github.com:${github.organization}/${project.artifactId}.git</connection>
        <developerConnection>scm:git:ssh://git@github.com:${github.organization}/${project.artifactId}.git
        </developerConnection>
        <url>https://github.com/${github.organization}/${project.artifactId}/tree/master</url>
    </scm>

    <dependencies>
        <dependency>
            <groupId>com.github.webdriverextensions</groupId>
            <artifactId>webdriverextensions</artifactId>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>com.github.webdriverextensions</groupId>
                <artifactId>webdriverextensions-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>install-drivers</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <proxyId/>
                    <keepDownloadedWebdrivers/>
                    <pluginWorkingDirectory/>
                    <installationDirectory>${project.basedir}/Drivers</installationDirectory>
                    <repositoryUrl>file:///${basedir}/driver-repository.json</repositoryUrl>
                    <drivers/>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <activation>
                <property>
                    <name>release</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <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-gpg-plugin</artifactId>
                    </plugin>

                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                    </plugin>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-release-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>