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

    <groupId>io.webthings</groupId>
    <artifactId>webthing</artifactId>
    <version>0.13.0</version>

    <name>WebThing</name>
    <description>Implementation of an HTTP Web Thing.</description>
    <url>https://github.com/WebThingsIO/webthing-java</url>

    <licenses>
        <license>
            <name>Mozilla Public License, Version 2.0 (MPL 2.0)</name>
            <url>https://www.mozilla.org/en-US/MPL/2.0/</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <scm>
        <connection>scm:git:https://github.com/WebThingsIO/webthing-java.git
        </connection>
        <developerConnection>
            scm:git:https://github.com/WebThingsIO/webthing-java.git
        </developerConnection>
        <url>https://github.com/WebThingsIO/webthing-java</url>
        <tag>HEAD</tag>
    </scm>

    <organization>
        <name>WebThingsIO</name>
        <url>https://webthings.io</url>
    </organization>

    <developers>
        <developer>
            <id>mrstegeman</id>
            <name>Michael Stegeman</name>
            <url>https://github.com/mrstegeman</url>
            <roles>
                <role>Administrator</role>
                <role>Developer</role>
            </roles>
            <properties>
                <picUrl>https://avatars1.githubusercontent.com/u/457381</picUrl>
            </properties>
        </developer>
        <developer>
            <id>Timmeey</id>
            <name>Tim Hinkes</name>
            <url>https://github.com/Timmeey</url>
            <roles>
                <role>Developer</role>
            </roles>
            <properties>
                <picUrl>https://avatars2.githubusercontent.com/u/1174542
                </picUrl>
            </properties>
        </developer>
    </developers>

    <inceptionYear>2018</inceptionYear>

    <issueManagement>
        <system>github</system>
        <url>https://github.com/WebThingsIO/webthing-java/issues</url>
    </issueManagement>

    <dependencies>
        <dependency>
            <groupId>org.json</groupId>
            <artifactId>json</artifactId>
            <version>20200518</version>
        </dependency>
        <dependency>
            <groupId>org.nanohttpd</groupId>
            <artifactId>nanohttpd</artifactId>
            <version>2.3.1</version>
        </dependency>
        <dependency>
            <groupId>org.nanohttpd</groupId>
            <artifactId>nanohttpd-nanolets</artifactId>
            <version>2.3.1</version>
        </dependency>
        <dependency>
            <groupId>org.nanohttpd</groupId>
            <artifactId>nanohttpd-websocket</artifactId>
            <version>2.3.1</version>
        </dependency>
        <dependency>
            <groupId>org.jmdns</groupId>
            <artifactId>jmdns</artifactId>
            <version>3.5.5</version>
        </dependency>
        <dependency>
            <groupId>com.github.everit-org.json-schema</groupId>
            <artifactId>org.everit.json.schema</artifactId>
            <version>1.12.1</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.13</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <repositories>
        <repository>
            <id>jitpack.io</id>
            <url>https://jitpack.io</url>
        </repository>
    </repositories>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
                <configuration>
                    <source>8</source>
                    <target>8</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.2.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.2.0</version>
                <configuration>
                    <source>8</source>
                    <target>8</target>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadoc</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>3.2.0</version>
                <configuration>
                    <archive>
                        <manifest>
                            <mainClass>
                                io.webthings.webthing.example.SingleThing
                            </mainClass>
                        </manifest>
                    </archive>
                    <descriptorRefs>
                        <descriptorRef>jar-with-dependencies
                        </descriptorRef>
                    </descriptorRefs>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <profiles>
        <profile>
            <id>release</id>
            <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>
                                <configuration>
                                    <!-- Prevent `gpg` from using pinentry programs -->
                                    <gpgArguments>
                                        <arg>--pinentry-mode</arg>
                                        <arg>loopback</arg>
                                    </gpgArguments>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.8</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

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