<?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <groupId>io.github.bonigarcia</groupId>
  <artifactId>webdrivermanager</artifactId>
  <version>webdrivermanager-5.0.0</version>
  <name>WebDriverManager</name>
  <description>Automated driver management and Docker builder for Selenium WebDriver</description>
  <url>https://bonigarcia.dev/webdrivermanager/</url>
  <licenses>
    <license>
      <name>Apache 2.0</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0</url>
    </license>
  </licenses>
  <developers>
    <developer>
      <id>bonigarcia</id>
      <name>Boni Garcia</name>
      <url>https://bonigarcia.dev/</url>
    </developer>
  </developers>
  <scm>
    <connection>scm:git:git://github.com/bonigarcia/webdrivermanager.git</connection>
    <developerConnection>scm:git:git@github.com:bonigarcia/webdrivermanager.git</developerConnection>
    <tag>webdrivermanager-5.0.0</tag>
    <url>https://github.com/bonigarcia/webdrivermanager</url>
  </scm>
  <distributionManagement>
    <repository>
      <id>sonatype-nexus-staging</id>
      <name>Sonatype Nexus release repository</name>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
    <snapshotRepository>
      <id>sonatype-nexus-snapshots</id>
      <name>Sonatype Nexus snapshot repository</name>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
  </distributionManagement>
  <properties>
    <maven-release-plugin.version>2.5.3</maven-release-plugin.version>
    <maven-gpg-plugin.version>3.0.1</maven-gpg-plugin.version>
    <guava.version>30.1.1-jre</guava.version>
    <wdm.mainClass>io.github.bonigarcia.wdm.WebDriverManager</wdm.mainClass>
    <maven-asciidoctor-plugin.version>2.2.1</maven-asciidoctor-plugin.version>
    <project.encondig>UTF-8</project.encondig>
    <asciidoctorj-pdf.version>1.6.0</asciidoctorj-pdf.version>
    <selenium.version>4.0.0-beta-4</selenium.version>
    <maven-javadoc-plugin.version>3.3.0</maven-javadoc-plugin.version>
    <slf4j.version>1.7.32</slf4j.version>
    <gson.version>2.8.8</gson.version>
    <maven.build.timestamp.format>dd-MM-yyyy</maven.build.timestamp.format>
    <assertj.version>3.20.2</assertj.version>
    <project.build.sourceEncoding>${project.encondig}</project.build.sourceEncoding>
    <wdm.agentClass>io.github.bonigarcia.wdm.WdmAgent</wdm.agentClass>
    <junit.version>5.7.2</junit.version>
    <maven-site.version>3.9.1</maven-site.version>
    <javalin.version>3.13.11</javalin.version>
    <logback.version>1.2.5</logback.version>
    <jacoco-maven-plugin.version>0.8.7</jacoco-maven-plugin.version>
    <wdm.manifest>src/main/resources/META-INF/MANIFEST.MF</wdm.manifest>
    <asciidoctorj-epub3.version>1.5.1</asciidoctorj-epub3.version>
    <maven-jar-plugin.version>3.2.0</maven-jar-plugin.version>
    <java.version>11</java.version>
    <maven.compiler.source>${java.version}</maven.compiler.source>
    <docker-java.version>3.2.11</docker-java.version>
    <jsoup.version>1.14.2</jsoup.version>
    <mockserver.version>5.11.2</mockserver.version>
    <project.reporting.outputEncoding>${project.encondig}</project.reporting.outputEncoding>
    <maven.compiler.target>${java.version}</maven.compiler.target>
    <maven-surefire-plugin.version>2.22.2</maven-surefire-plugin.version>
    <brotli.version>0.1.2</brotli.version>
    <maven-project-info-reports.version>3.1.2</maven-project-info-reports.version>
    <exec-maven-plugin.version>3.0.0</exec-maven-plugin.version>
  </properties>
  <dependencies>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>${slf4j.version}</version>
    </dependency>
    <dependency>
      <groupId>com.google.code.gson</groupId>
      <artifactId>gson</artifactId>
      <version>${gson.version}</version>
    </dependency>
    <dependency>
      <groupId>org.jsoup</groupId>
      <artifactId>jsoup</artifactId>
      <version>${jsoup.version}</version>
    </dependency>
    <dependency>
      <groupId>com.github.docker-java</groupId>
      <artifactId>docker-java</artifactId>
      <version>${docker-java.version}</version>
      <exclusions>
        <exclusion>
          <artifactId>docker-java-transport-jersey</artifactId>
          <groupId>com.github.docker-java</groupId>
        </exclusion>
        <exclusion>
          <artifactId>docker-java-transport-netty</artifactId>
          <groupId>com.github.docker-java</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>com.github.docker-java</groupId>
      <artifactId>docker-java-transport-httpclient5</artifactId>
      <version>${docker-java.version}</version>
    </dependency>
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
      <version>${guava.version}</version>
    </dependency>
    <dependency>
      <groupId>org.brotli</groupId>
      <artifactId>dec</artifactId>
      <version>${brotli.version}</version>
    </dependency>
    <dependency>
      <groupId>org.seleniumhq.selenium</groupId>
      <artifactId>selenium-java</artifactId>
      <version>${selenium.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>io.javalin</groupId>
      <artifactId>javalin</artifactId>
      <version>${javalin.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <version>${logback.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter</artifactId>
      <version>${junit.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
      <version>${assertj.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mock-server</groupId>
      <artifactId>mockserver-junit-jupiter</artifactId>
      <version>${mockserver.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.seleniumhq.selenium</groupId>
      <artifactId>selenium-grid</artifactId>
      <version>${selenium.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-release-plugin</artifactId>
        <version>${maven-release-plugin.version}</version>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>${maven-surefire-plugin.version}</version>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>${jacoco-maven-plugin.version}</version>
        <executions>
          <execution>
            <id>prepare-agent</id>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
          <execution>
            <id>report</id>
            <phase>test</phase>
            <goals>
              <goal>report</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <excludes>
            <exclude>**com.gargoylesoftware*</exclude>
          </excludes>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>exec-maven-plugin</artifactId>
        <version>${exec-maven-plugin.version}</version>
        <executions>
          <execution>
            <goals>
              <goal>java</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <mainClass>${wdm.mainClass}</mainClass>
          <includePluginDependencies>false</includePluginDependencies>
          <cleanupDaemonThreads>false</cleanupDaemonThreads>
          <classpathScope>test</classpathScope>
          <systemProperties>
            <systemProperty>
              <key>logback.configurationFile</key>
              <value>src/main/resources/logback.xml</value>
            </systemProperty>
          </systemProperties>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <configuration>
          <archive>
            <manifest>
              <mainClass>${wdm.mainClass}</mainClass>
            </manifest>
            <manifestEntries>
              <Premain-Class>${wdm.agentClass}</Premain-Class>
              <Can-Redefine-Classes>true</Can-Redefine-Classes>
              <Can-Retransform-Classes>true</Can-Retransform-Classes>
            </manifestEntries>
          </archive>
          <descriptors>
            <descriptor>src/main/resources/assembly.xml</descriptor>
          </descriptors>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <version>${maven-jar-plugin.version}</version>
        <configuration>
          <excludes>
            <exclude>**/*.xml</exclude>
          </excludes>
          <archive>
            <manifestFile>${wdm.manifest}</manifestFile>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.asciidoctor</groupId>
        <artifactId>asciidoctor-maven-plugin</artifactId>
        <version>${maven-asciidoctor-plugin.version}</version>
        <executions>
          <execution>
            <id>asciidoc-to-html</id>
            <phase>pre-site</phase>
            <goals>
              <goal>process-asciidoc</goal>
            </goals>
            <configuration>
              <backend>html5</backend>
              <attributes>
                <source-highlighter>coderay</source-highlighter>
                <stylesheet>css/styles.css</stylesheet>
                <imagesdir>img</imagesdir>
                <toc>left</toc>
                <icons>font</icons>
                <sectanchors>true</sectanchors>
                <idprefix />
                <idseparator>-</idseparator>
                <docinfo1>true</docinfo1>
                <toclevels>3</toclevels>
                <sectnums />
                <lang>en</lang>
                <docdatetime>${maven.build.timestamp}</docdatetime>
                <last-update-label>Updated on</last-update-label>
              </attributes>
            </configuration>
          </execution>
          <execution>
            <id>asciidoc-to-pdf</id>
            <phase>site</phase>
            <goals>
              <goal>process-asciidoc</goal>
            </goals>
            <configuration>
              <doctype>book</doctype>
              <backend>pdf</backend>
              <sourceDirectory>src/doc/asciidoc</sourceDirectory>
              <sourceDocumentName>index.adoc</sourceDocumentName>
              <outputFile>${project.artifactId}.pdf</outputFile>
              <attributes>
                <source-highlighter>coderay</source-highlighter>
                <imagesdir>img</imagesdir>
                <pagenums />
                <toc />
                <idprefix />
                <idseparator>-</idseparator>
                <icons>font</icons>
                <sectnums />
                <lang>en</lang>
                <revnumber>${project.version}</revnumber>
                <revdate>${maven.build.timestamp}</revdate>
              </attributes>
            </configuration>
          </execution>
          <execution>
            <id>asciidoc-to-epub</id>
            <phase>site</phase>
            <goals>
              <goal>process-asciidoc</goal>
            </goals>
            <configuration>
              <doctype>book</doctype>
              <backend>epub3</backend>
              <sourceDirectory>src/doc/asciidoc</sourceDirectory>
              <sourceDocumentName>index.adoc</sourceDocumentName>
              <outputFile>${project.artifactId}.epub</outputFile>
              <attributes>
                <source-highlighter>coderay</source-highlighter>
                <imagesdir>img</imagesdir>
                <pagenums />
                <toc />
                <idprefix />
                <idseparator>-</idseparator>
                <icons>font</icons>
                <sectnums />
                <lang>en</lang>
                <revnumber>${project.version}</revnumber>
                <revdate>${maven.build.timestamp}</revdate>
              </attributes>
            </configuration>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>org.asciidoctor</groupId>
            <artifactId>asciidoctorj-pdf</artifactId>
            <version>${asciidoctorj-pdf.version}</version>
          </dependency>
          <dependency>
            <groupId>org.asciidoctor</groupId>
            <artifactId>asciidoctorj-epub3</artifactId>
            <version>${asciidoctorj-epub3.version}</version>
          </dependency>
        </dependencies>
        <configuration>
          <sourceDirectory>src/doc/asciidoc</sourceDirectory>
          <attributes>
            <endpoint-url>https://bonigarcia.dev</endpoint-url>
            <sourcedir>${project.build.sourceDirectory}</sourcedir>
            <project-version>${project.version}</project-version>
          </attributes>
          <outputDirectory>${basedir}/docs</outputDirectory>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-site-plugin</artifactId>
        <version>${maven-site.version}</version>
      </plugin>
      <plugin>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>${maven-project-info-reports.version}</version>
      </plugin>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>${maven-javadoc-plugin.version}</version>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <source>8</source>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>release-sign-artifacts</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>${maven-gpg-plugin.version}</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <passphrase>${gpg.passphrase}</passphrase>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
