<?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/maven-v4_0_0.xsd">

    <modelVersion>4.0.0</modelVersion>
    <prerequisites>
        <maven>3.0.4</maven>
    </prerequisites>

    <parent>
        <groupId>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>7</version>
    </parent>

    <name>Snice Modem</name>
    <groupId>io.snice.modem</groupId>
    <artifactId>snice-parent</artifactId>
    <version>0.1.0</version>
    <packaging>pom</packaging>
    <description>Snice Modem - A Super Nice GSM Modem</description>
    <licenses>
        <license>
            <name>MIT License</name>
            <url>http://www.opensource.org/licenses/mit-license.php</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Jonas Borjesson</name>
            <email>jonas@jonasborjesson.com</email>
            <timezone>-8</timezone>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:git@github.com:sniceio/snice-modem.git</connection>
        <developerConnection>scm:git:git@github.com:sniceio/snice-modem.git</developerConnection>
	<url>git@github.com:sniceio/snice-modem.git</url>
        <tag>HEAD</tag>
    </scm>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <snice-commons.version>0.1.1</snice-commons.version>
        <hektor.version>0.0.2</hektor.version>
        <logback.version>1.2.3</logback.version>
        <sl4j.version>1.7.25</sl4j.version>
        <jackson.version>2.9.9</jackson.version>
        <fazecast.version>2.4.0</fazecast.version>
        <junit.version>4.8.2</junit.version>
        <mockito.version>2.27.0</mockito.version>
    </properties>

    <modules>
        <module>modem-core</module>
        <module>modem-shell</module>
    </modules>

    <dependencyManagement>
        <dependencies>

            <dependency>
                <groupId>io.snice.modem</groupId>
                <artifactId>modem-core</artifactId>
                <version>${project.version}</version>
                <type>jar</type>
                <scope>compile</scope>
            </dependency>

            <dependency>
                <groupId>io.snice.modem</groupId>
                <artifactId>modem-shell</artifactId>
                <version>${project.version}</version>
                <type>jar</type>
                <scope>compile</scope>
            </dependency>

            <dependency>
                <groupId>io.snice</groupId>
                <artifactId>snice-buffers</artifactId>
                <version>${snice-commons.version}</version>
                <type>jar</type>
                <scope>compile</scope>
            </dependency>

            <dependency>
                <groupId>io.snice</groupId>
                <artifactId>snice-commons</artifactId>
                <version>${snice-commons.version}</version>
                <type>jar</type>
                <scope>compile</scope>
            </dependency>

            <dependency>
                <groupId>io.hektor</groupId>
                <artifactId>hektor-core</artifactId>
                <version>${hektor.version}</version>
                <type>jar</type>
                <scope>compile</scope>
            </dependency>

            <dependency>
                <groupId>io.hektor</groupId>
                <artifactId>hektor-actors</artifactId>
                <version>${hektor.version}</version>
                <type>jar</type>
                <scope>compile</scope>
            </dependency>

            <dependency>
                <groupId>io.hektor</groupId>
                <artifactId>hektor-fsm</artifactId>
                <version>${hektor.version}</version>
                <type>jar</type>
                <scope>compile</scope>
            </dependency>

            <dependency>
                <groupId>com.fazecast</groupId>
                <artifactId>jSerialComm</artifactId>
                <version>${fazecast.version}</version>
                <type>jar</type>
                <scope>compile</scope>
            </dependency>

            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-classic</artifactId>
                <version>${logback.version}</version>
                <scope>runtime</scope>
            </dependency>

            <!-- For dealing with everything json -->
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-databind</artifactId>
                <version>${jackson.version}</version>
                <type>jar</type>
                <scope>compile</scope>
            </dependency>

            <!-- For reading yaml files and converting them to json -->
            <dependency>
                <groupId>com.fasterxml.jackson.dataformat</groupId>
                <artifactId>jackson-dataformat-yaml</artifactId>
                <version>${jackson.version}</version>
                <type>jar</type>
                <scope>compile</scope>
            </dependency>

            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-annotations</artifactId>
                <version>${jackson.version}</version>
                <type>jar</type>
                <scope>compile</scope>
            </dependency>

            <!-- For Java8 data types support such as Optional-->
            <dependency>
                <groupId>com.fasterxml.jackson.datatype</groupId>
                <artifactId>jackson-datatype-jdk8</artifactId>
                <version>${jackson.version}</version>
                <type>jar</type>
                <scope>compile</scope>
            </dependency>

            <!-- For Java8 date/time support such as Duration -->
            <dependency>
                <groupId>com.fasterxml.jackson.datatype</groupId>
                <artifactId>jackson-datatype-jsr310</artifactId>
                <version>${jackson.version}</version>
                <type>jar</type>
                <scope>compile</scope>
            </dependency>

            <!-- Test Dependencies -->
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${junit.version}</version>
                <type>jar</type>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>${mockito.version}</version>
                <type>jar</type>
                <scope>test</scope>
            </dependency>

        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>versions-maven-plugin</artifactId>
                <version>2.5</version>
                <configuration>
                    <generateBackupPoms>false</generateBackupPoms>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
                <configuration>
                    <source>11</source>
                    <target>11</target>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.0.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>2.9</version>
                <configuration>
                    <additionalparam>-Xdoclint:none</additionalparam>
                    <!-- See for why source 8: https://bugs.openjdk.java.net/browse/JDK-8212233 -->
                    <source>8</source>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <version>1.6.0</version>
                <!--
                <executions>
                    <execution>
                        <goals>
                            <goal>java</goal>
                        </goals>
                    </execution>
                </executions>
                -->
                <configuration>
                    <executable>java</executable>
                    <mainClass>sh.modem.Shell</mainClass>
                    <arguments>
                        <argument>shell-config.yml</argument>
                        <!--
                        <argument>-classpath</argument>
                        <classpath />
                        -->
                    </arguments>
                </configuration>
            </plugin>


        </plugins>
    </build>

</project>
