<?xml version="1.0" encoding="UTF-8"?>
<!--
 | Licensed to the Apache Software Foundation (ASF) under one
 | or more contributor license agreements.  See the NOTICE file
 | distributed with this work for additional information
 | regarding copyright ownership.  The ASF licenses this file
 | to you 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>org.apache.onami</groupId>
    <artifactId>org.apache.onami.parent</artifactId>
    <version>5</version>
  </parent>

  <artifactId>org.apache.onami.console</artifactId>
  <version>1.0.0-SNAPSHOT</version>

  <name>Apache Onami Console</name>
  <description>Apache Onami-Console ... TODO</description>
  <url>http://onami.apache.org/console/</url>

  <scm>
    <url>https://svn.apache.org/viewvc/onami/trunk/console</url>
    <connection>scm:svn:https://svn.apache.org/repos/asf/onami/trunk/console</connection>
    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/onami/trunk/console</developerConnection>
  </scm>
  <issueManagement>
    <system>JIRA</system>
    <url>https://issues.apache.org/jira/browse/ONAMI/component/12320811</url>
  </issueManagement>
  <ciManagement>
    <system>Jenkins</system>
    <url>https://builds.apache.org/job/Onami-Console/</url>
    <notifiers>
      <notifier>
        <type>mail</type>
        <sendOnError>true</sendOnError>
        <sendOnFailure>true</sendOnFailure>
        <sendOnSuccess>false</sendOnSuccess>
        <sendOnWarning>false</sendOnWarning>
        <configuration>
          <address>dev@onami.apache.org</address>
        </configuration>
      </notifier>
    </notifiers>
  </ciManagement>
  <distributionManagement>
    <site>
      <id>apache.website.svnpub</id>
      <url>scm:svn:https://svn.apache.org/repos/asf/onami/site/console</url>
    </site>
  </distributionManagement>

  <properties>
    <log4j.version>2.0-beta8</log4j.version>
    <onami.logging.version>3.4.0-incubating</onami.logging.version>
  </properties>

  <dependencies>
    <!--
     | THE cli parser
    -->
    <dependency>
      <groupId>io.airlift</groupId>
      <artifactId>airline</artifactId>
      <version>0.5</version>
    </dependency>

    <!--
     | read from console
    -->
    <dependency>
      <groupId>jline</groupId>
      <artifactId>jline</artifactId>
      <version>2.11</version>
    </dependency>

    <!--
     | @Inject
    -->
    <dependency>
      <groupId>javax.inject</groupId>
      <artifactId>javax.inject</artifactId>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.google.inject</groupId>
      <artifactId>guice</artifactId>
      <scope>compile</scope>
    </dependency>

    <!--
     | logging world
    -->
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-api</artifactId>
      <version>${log4j.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-core</artifactId>
      <version>${log4j.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.onami.logging</groupId>
      <artifactId>org.apache.onami.logging.core</artifactId>
      <version>${onami.logging.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.onami.logging</groupId>
      <artifactId>org.apache.onami.logging.log4j2</artifactId>
      <version>${onami.logging.version}</version>
      <scope>runtime</scope>
      <exclusions>
        <exclusion>
          <groupId>org.apache.logging.log4j</groupId>
          <artifactId>log4j-api</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.apache.logging.log4j</groupId>
          <artifactId>log4j-core</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <!--
     | configuration - all users need to configure components
    -->
    <dependency>
      <groupId>org.apache.onami</groupId>
      <artifactId>org.apache.onami.configuration</artifactId>
      <version>6.3.0</version>
    </dependency>

    <!--
     | discover commands and modules just declaring them!
    -->
    <dependency>
      <groupId>org.apache.onami.spi</groupId>
      <artifactId>org.apache.onami.spi.all</artifactId>
      <version>1.0.0</version>
    </dependency>

    <!--
     | be able to bind strings to Java types!
    -->
    <dependency>
      <groupId>org.apache.onami.converters</groupId>
      <artifactId>org.apache.onami.converters.all</artifactId>
      <version>1.0.0</version>
    </dependency>

    <!--
     | Test dependencies
    -->
    <dependency>
      <groupId>org.apache.onami</groupId>
      <artifactId>org.apache.onami.test</artifactId>
      <version>1.4.0-incubating</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <resources>
      <resource>
        <directory>${basedir}</directory>
        <targetPath>META-INF</targetPath>
        <includes>
          <include>LICENSE</include>
          <include>NOTICE</include>
        </includes>
      </resource>

      <resource>
        <directory>${basedir}/src/main/resources</directory>
        <includes>
          <include>logback-config.xml</include>
          <include>META-INF/services/**</include>
        </includes>
      </resource>

      <resource>
        <directory>${basedir}/src/main/resources</directory>
        <filtering>true</filtering>
        <includes>
          <include>META-INF/maven/**</include>
        </includes>
      </resource>
    </resources>

    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>appassembler-maven-plugin</artifactId>
        <version>1.4</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>assemble</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <programs>
            <program>
              <mainClass>org.apache.onami.console.OnamiConsole</mainClass>
              <name>ocr</name>
            </program>
          </programs>
          <repositoryLayout>flat</repositoryLayout>
          <repositoryName>lib</repositoryName>
          <extraJvmArguments>-server -Xms500m -Xmx500m -XX:PermSize=128m -XX:-UseGCOverheadLimit</extraJvmArguments>
          <licenseHeaderFile>${basedir}/src/main/assembly/license-header.txt</licenseHeaderFile>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-assembly-plugin</artifactId>
        <executions>
          <execution>
            <id>assembly</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <attach>true</attach>
          <tarLongFileMode>gnu</tarLongFileMode>
          <appendAssemblyId>false</appendAssemblyId>
          <descriptors>
            <descriptor>${basedir}/src/main/assembly/bin.xml</descriptor>
          </descriptors>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
        <configuration>
          <locales>en</locales>
          <skipDeploy>true</skipDeploy>
        </configuration>
        <executions>
          <execution>
            <id>attach-descriptor</id>
            <goals>
              <goal>attach-descriptor</goal>
            </goals>
          </execution>
          <execution>
            <id>stage-for-scm-publish</id>
            <phase>post-site</phase>
            <goals>
              <goal>stage</goal>
            </goals>
            <configuration>
              <skipDeploy>false</skipDeploy>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-scm-publish-plugin</artifactId>
        <inherited>false</inherited>
        <configuration>
          <checkinComment>Onami Configuration site deployment</checkinComment>
          <checkoutDirectory>${user.home}/onami-sites/onami-console-site</checkoutDirectory>
        </configuration>
        <executions>
          <execution>
            <id>scm-publish</id>
            <phase>site-deploy</phase>
            <goals>
              <goal>publish-scm</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

</project>
