<?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>org.iota</groupId>
    <artifactId>jota-parent</artifactId>
    <version>1.0.0-beta3</version>
    <packaging>pom</packaging>
    <name>JOTA</name>
    <description>JOTA library is a simple Java wrapper around IOTA Node's JSON-REST HTTP interface.</description>
    <url>https://github.com/iotaledger/iota-java</url>

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

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

    <developers>
        <developer>
            <id>pinpong</id>
            <name>Oliver Nitzschke</name>
        </developer>
        <developer>
            <id>davassi</id>
            <name>Gianluigi Davassi</name>
        </developer>
        <developer>
            <id>adrianziser</id>
        </developer>
        <developer>
            <id>heinrichreimer</id>
            <name>Heinrich Reimer</name>
        </developer>
        <developer>
            <id>jpkrohling</id>
            <name>Juraci Paixão Kröhling</name>
        </developer>
	<developer>
		<id>th0br0</id>
		<name>Andreas C. Osowski</name>
	</developer>
	<developer>
		<id>kwek20</id>
		<name>Brord van Wierst</name>
	</developer>
    </developers>

    <properties>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <!-- plugins -->
        <version.maven-checkstyle-plugin>3.0.0</version.maven-checkstyle-plugin>
        <version.maven-release-plugin>2.5.3</version.maven-release-plugin>
        <version.maven-source-plugin>3.0.1</version.maven-source-plugin>
        <version.maven-javadoc-plugin>2.10.4</version.maven-javadoc-plugin>
        <version.maven-surefire-plugin>2.12</version.maven-surefire-plugin>
        <version.maven-site-plugin>3.7.1</version.maven-site-plugin>
        
        <checkstyle.config.location>checkstyle.xml</checkstyle.config.location>
    </properties>

    <modules>
        <module>jota</module>
    </modules>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.bouncycastle</groupId>
                <artifactId>bcprov-jdk15on</artifactId>
                <version>1.58</version>
            </dependency>
            <dependency>
                <groupId>com.squareup.retrofit2</groupId>
                <artifactId>retrofit</artifactId>
                <version>2.3.0</version>
            </dependency>
            <dependency>
                <groupId>com.squareup.retrofit2</groupId>
                <artifactId>converter-gson</artifactId>
                <version>2.3.0</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>3.6</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>1.7.25</version>
            </dependency>
            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>2.5</version>
            </dependency>

            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.12</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>net.jadler</groupId>
                <artifactId>jadler-all</artifactId>
                <version>1.3.0</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
    </distributionManagement>

    <build>
        <plugins>
		<plugin>
			<groupId>org.sonatype.plugins</groupId>
			<artifactId>nexus-staging-maven-plugin</artifactId>
			<version>1.6.7</version>
			<extensions>true</extensions>
			<configuration>
				<serverId>ossrh</serverId>
				<nexusUrl>https://oss.sonatype.org/</nexusUrl>
				<autoReleaseAfterClose>true</autoReleaseAfterClose>
			</configuration>
		</plugin>
            <plugin>
	            <groupId>org.apache.maven.plugins</groupId>
	            <artifactId>maven-checkstyle-plugin</artifactId>
	            <version>${version.maven-checkstyle-plugin}</version>
	            <configuration>
	                <logViolationsToConsole>true</logViolationsToConsole>
	            </configuration>
                <executions>
                    <execution>
                        <id>validate</id>
                        <phase>validate</phase>
                        <configuration>
                            <configLocation>${checkstyle.config.location}</configLocation>
                            <encoding>UTF-8</encoding>
                            <consoleOutput>true</consoleOutput>
                            <failsOnError>true</failsOnError>
                        </configuration>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
	        </plugin>
            <plugin>
                <artifactId>maven-release-plugin</artifactId>
                <version>${version.maven-release-plugin}</version>
                <configuration>
                    <useReleaseProfile>false</useReleaseProfile>
                    <releaseProfiles>release</releaseProfiles>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <tagNameFormat>@{project.version}</tagNameFormat>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${version.maven-surefire-plugin}</version>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.maven.surefire</groupId>
                        <artifactId>surefire-junit47</artifactId>
                        <version>${version.maven-surefire-plugin}</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <excludedGroups>jota.category.IntegrationTest</excludedGroups>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <activation>
		          <activeByDefault>true</activeByDefault>
		    </activation>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-assembly-plugin</artifactId>
                        <configuration>
                            <archive>
                                <manifest>
                                    <mainClass />
                                </manifest>
                            </archive>
                            <descriptorRefs>
                                <descriptorRef>jar-with-dependencies</descriptorRef>
                            </descriptorRefs>
                        </configuration>
                        <executions>
                            <execution>
                                <id>make-assembly</id> <!-- this is used for inheritance merges -->
                                <phase>package</phase> <!-- bind to the packaging phase -->
                                <goals>
                                    <goal>single</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>${version.maven-source-plugin}</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    
                    <plugin>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>${version.maven-javadoc-plugin}</version>
                        <configuration>
                            <failOnError>false</failOnError>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                                <phase>package</phase>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <artifactId>maven-site-plugin</artifactId>
                        <version>${version.maven-site-plugin}</version>
                    </plugin>
		    <plugin>
			    <groupId>org.apache.maven.plugins</groupId>
			    <artifactId>maven-gpg-plugin</artifactId>
			    <version>1.5</version>
			    <executions>
				    <execution>
					    <id>sign-artifacts</id>
					    <phase>verify</phase>
					    <goals>
						    <goal>sign</goal>
					    </goals>
				    </execution>
			    </executions>
		    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
