<?xml version="1.0" encoding="UTF-8"?>
<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>dnsjava</groupId>
    <artifactId>dnsjava</artifactId>
    <packaging>bundle</packaging>
    <version>3.0.0</version>
    <name>dnsjava</name>
    <description>dnsjava is an implementation of DNS in Java. It supports all defined record types (including the DNSSEC
        types), and unknown types. It can be used for queries, zone transfers, and dynamic updates. It includes a cache
        which can be used by clients, and a minimal implementation of a server. It supports TSIG authenticated messages,
        partial DNSSEC verification, and EDNS0.
    </description>
    <url>https://github.com/dnsjava/dnsjava</url>
    <organization>
        <name>dnsjava.org</name>
        <url>https://github.com/dnsjava/dnsjava</url>
    </organization>
    <licenses>
        <license>
            <name>BSD-2-Clause</name>
            <url>https://opensource.org/licenses/BSD-2-Clause</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    <scm>
        <connection>scm:git:https://github.com/dnsjava/dnsjava</connection>
        <developerConnection>scm:git:https://github.com/dnsjava/dnsjava</developerConnection>
        <url>https://github.com/dnsjava/dnsjava</url>
        <tag>v3.0.0</tag>
    </scm>
    <developers>
        <developer>
            <id>bwelling</id>
            <name>Brian Wellington</name>
        </developer>
        <developer>
            <id>ibauersachs</id>
            <name>Ingo Bauersachs</name>
        </developer>
    </developers>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <target.jdk>1.8</target.jdk>
        <org.junit.version>5.4.2</org.junit.version>
        <slf4j.version>1.7.30</slf4j.version>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>1.6</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
                <configuration>
                    <source>${target.jdk}</source>
                    <target>${target.jdk}</target>
                    <compilerArgument>-Xlint:unchecked</compilerArgument>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.0.1</version>
            </plugin>

            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <version>4.2.0</version>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Bundle-Name>dnsjava is an implementation of DNS in Java</Bundle-Name>
                        <Bundle-SymbolicName>org.xbill.dns</Bundle-SymbolicName>
                        <Automatic-Module-Name>org.dnsjava</Automatic-Module-Name>
                        <Export-Package>
                            org.xbill.DNS.*
                        </Export-Package>
                        <Import-Package>
                            !org.xbill.DNS*,
                            !sun.*,
                            !lombok,
                            android.*;resolution:=optional,
                            javax.naming.*;resolution:=optional,
                            com.sun.jna.*;resolution:=optional,*
                        </Import-Package>
                        <Bundle-RequiredExecutionEnvironment>JavaSE-1.8</Bundle-RequiredExecutionEnvironment>
                        <Bundle-License>
                            BSD-2-Clause;link="https://raw.githubusercontent.com/dnsjava/dnsjava/master/LICENSE"
                        </Bundle-License>
                        <_removeheaders>Bnd-*, Tool, Require-Capability, Include-Resource</_removeheaders>
                        <Include-Resource>
                            {maven-resources},
                            META-INF/LICENSE=LICENSE
                        </Include-Resource>
                        <Main-Class>org.xbill.DNS.tools.Tools</Main-Class>
                    </instructions>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.0.1</version>
                <configuration>
                    <debug>true</debug>
                    <windowtitle>dnsjava documentation</windowtitle>
                    <footer/>
                    <doclint>none</doclint>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.22.2</version>
                <configuration>
                    <includes>
                        <!-- Override default config to include inner test classes -->
                        <include>**/*Test*</include>
                    </includes>
                    <excludes>
                        <!-- Override default config to not exclude inner test classes -->
                        <exclude/>
                    </excludes>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>0.8.4</version>
                <executions>
                    <execution>
                        <id>prepare-agent</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.eluder.coveralls</groupId>
                <artifactId>coveralls-maven-plugin</artifactId>
                <version>4.3.0</version>
            </plugin>

            <plugin>
                <groupId>com.github.siom79.japicmp</groupId>
                <artifactId>japicmp-maven-plugin</artifactId>
                <version>0.14.0</version>
                <configuration>
                    <parameter>
                        <onlyModified>true</onlyModified>
                        <breakBuildBasedOnSemanticVersioning>true</breakBuildBasedOnSemanticVersioning>
                        <excludes>
                            <!-- JDK9 removed the Nameservice SPI as per bug 8134577. -->
                            <exclude>org.xbill.DNS.spi</exclude>
                        </excludes>
                    </parameter>
                </configuration>
                <executions>
                    <execution>
                        <id>check-compatibility</id>
                        <phase>package</phase>
                        <goals>
                            <goal>cmp</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>com.coveo</groupId>
                <artifactId>fmt-maven-plugin</artifactId>
                <version>2.9</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j.version}</version>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>1.18.10</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.robolectric</groupId>
            <artifactId>android-all</artifactId>
            <version>10-robolectric-5803371</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>net.java.dev.jna</groupId>
            <artifactId>jna</artifactId>
            <version>5.5.0</version>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>net.java.dev.jna</groupId>
            <artifactId>jna-platform</artifactId>
            <version>5.5.0</version>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.bouncycastle</groupId>
            <artifactId>bcprov-jdk15on</artifactId>
            <version>1.64</version>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <version>${org.junit.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>${org.junit.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>3.1.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <version>${slf4j.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <!-- JDK9 removed the Nameservice SPI as per bug 8134577. There's no replacement. -->
            <id>no-spi-on-java9</id>
            <activation>
                <jdk>[1.9,)</jdk>
            </activation>

            <properties>
                <target.jdk>9</target.jdk>
                <maven.compiler.release>${target.jdk}</maven.compiler.release>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <configuration>
                            <excludes>
                                <exclude>org/xbill/DNS/spi/**</exclude>
                            </excludes>
                        </configuration>
                    </plugin>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <configuration>
                            <excludePackageNames>*.spi.*</excludePackageNames>
                        </configuration>
                    </plugin>
                </plugins>

                <resources>
                    <resource>
                        <directory>src/main/resources</directory>
                        <excludes>
                            <exclude>META-INF/services/sun.net.spi.nameservice.NameServiceDescriptor</exclude>
                        </excludes>
                    </resource>
                </resources>
            </build>
        </profile>
    </profiles>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>
</project>
