<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2019 ACINQ SAS
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~     http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<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>
    <parent>
        <groupId>fr.acinq.eclair</groupId>
        <artifactId>eclair_2.11</artifactId>
        <version>0.4.7-android-phoenix</version>
    </parent>

    <artifactId>eclair-node_2.11</artifactId>
    <packaging>jar</packaging>

    <name>eclair-node</name>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifest>
                            <addClasspath>true</addClasspath>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                        </manifest>
                        <manifestEntries>
                            <!-- we hide the git commit in the Specification-Version standard field-->
                            <Specification-Version>${git.commit.id}</Specification-Version>
                            <Url>${project.parent.url}</Url>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>3.2.0</version>
                <configuration>
                    <finalName>${project.name}-${project.version}-${git.commit.id.abbrev}</finalName>
                    <descriptors>
                        <descriptor>modules/assembly.xml</descriptor>
                    </descriptors>
                    <archive>
                        <manifest>
                            <mainClass>fr.acinq.eclair.Boot</mainClass>
                        </manifest>
                    </archive>
                </configuration>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>fr.acinq.eclair</groupId>
            <artifactId>eclair-core_${scala.version.short}</artifactId>
            <version>${project.version}</version>
        </dependency>
        <!-- logging -->
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>1.2.3</version>
        </dependency>
        <dependency>
            <!--conditional logging -->
            <groupId>org.codehaus.janino</groupId>
            <artifactId>janino</artifactId>
            <version>3.0.7</version>
        </dependency>
        <!-- http server -->
        <dependency>
            <groupId>io.spray</groupId>
            <artifactId>spray-can_${scala.version.short}</artifactId>
            <version>1.3.3</version>
        </dependency>
        <dependency>
            <groupId>io.spray</groupId>
            <artifactId>spray-http_${scala.version.short}</artifactId>
            <version>1.3.3</version>
        </dependency>
        <dependency>
            <groupId>io.spray</groupId>
            <artifactId>spray-httpx_${scala.version.short}</artifactId>
            <version>1.3.3</version>
        </dependency>
        <dependency>
            <groupId>io.spray</groupId>
            <artifactId>spray-routing-shapeless2_${scala.version.short}</artifactId>
            <version>1.3.3</version>
            <exclusions>
                <exclusion>
                    <groupId>com.chuusai</groupId>
                    <artifactId>shapeless_2.11</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>io.spray</groupId>
            <artifactId>spray-util_${scala.version.short}</artifactId>
            <version>1.3.3</version>
        </dependency>
        <!-- test dependencies -->
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-scala-scalatest_${scala.version.short}</artifactId>
            <version>1.5.9</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.spray</groupId>
            <artifactId>spray-testkit_${scala.version.short}</artifactId>
            <version>1.3.3</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
</project>