<?xml version="1.0" encoding="UTF-8"?>
<!--
 Copyright (c) 2001-2015, Zoltan Farkas All Rights Reserved.

  This library is free software; you can redistribute it and/or
  modify it under the terms of the GNU Lesser General Public
  License as published by the Free Software Foundation; either
  version 2.1 of the License, or (at your option) any later version.

  This library is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU Lesser General Public
  License along with this program; if not, write to the Free Software
  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-->
<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.spf4j</groupId>
  <artifactId>spf4j-ui</artifactId>
  <packaging>jar</packaging>
  <parent>
    <groupId>org.spf4j</groupId>
    <artifactId>spf4j</artifactId>
    <version>8.9.0</version>
  </parent>
  <name>${project.artifactId}</name>
  <description>A simple swing UI that allows you to visualize/export diagnostic files generates
    with the spf4j-core library: tsdb, ssdump...</description>

    <properties>
        <jacoco.instruction.ratio>0.1</jacoco.instruction.ratio>
        <jacoco.class.ratio>0.1</jacoco.class.ratio>
        <jacoco.method.ratio>0.1</jacoco.method.ratio>
    </properties>

  <dependencies>
    <dependency>
      <groupId>org.spf4j</groupId>
      <artifactId>spf4j-core</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.spf4j</groupId>
      <artifactId>spf4j-avro</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
       <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
      <version>${guava.version}</version>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>${junit.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.spf4j</groupId>
      <artifactId>spf4j-slf4j-test</artifactId>
      <scope>test</scope>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.swinglabs</groupId>
      <artifactId>swing-layout</artifactId>
      <version>1.0.3</version>
    </dependency>
    <dependency>
      <groupId>org.jfree</groupId>
      <artifactId>jfreechart</artifactId>
      <version>1.0.19</version>
    </dependency>
    <dependency>
      <groupId>com.google.protobuf</groupId>
      <artifactId>protobuf-java</artifactId>
      <version>2.6.1</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-swing-junit</artifactId>
      <version>3.8.0</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  
  <build>
    <plugins>
      <plugin>
        <groupId>com.github.os72</groupId>
        <artifactId>protoc-jar-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <index>true</index>
            <manifest>
              <addClasspath>true</addClasspath>
              <mainClass>org.spf4j.ui.Explorer</mainClass>
            </manifest>
          </archive>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-shade-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <filters>
                <filter>
                  <artifact>*:*</artifact>
                  <excludes>
                    <exclude>META-INF/*.SF</exclude>
                    <exclude>META-INF/*.DSA</exclude>
                    <exclude>META-INF/*.RSA</exclude>
                  </excludes>
                </filter>
              </filters>
              <transformers>
                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                  <mainClass>org.spf4j.ui.Explorer</mainClass>
                </transformer>
              </transformers>
              <shadedArtifactAttached>true</shadedArtifactAttached>
              <shadedClassifierName>uber</shadedClassifierName>
            </configuration>
          </execution>
        </executions>
      </plugin>
       
      <!--  attempt to package file for mac
      <plugin>
          <groupId>io.github.appbundler</groupId>
          <artifactId>appbundle-maven-plugin</artifactId>
          <version>1.0-SNAPSHOT</version>
          <configuration>
              <jvmVersion>1.7+</jvmVersion>
              <mainClass>org.spf4j.ui.Explorer</mainClass>
          </configuration>
          <executions>
              <execution>
                  <phase>package</phase>
                  <goals>
                      <goal>bundle</goal>
                  </goals>
              </execution>
          </executions>
      </plugin>
      -->
                                                                                                                                                                                    
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <properties>
            <property>
              <name>listener</name>
              <value>org.spf4j.test.log.junit4.DetailOnFailureRunListener</value>
            </property>
          </properties>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>com.github.spotbugs</groupId>
        <artifactId>spotbugs-maven-plugin</artifactId>
      </plugin>
            
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <configuration>
          <excludes>**/proto/gen/**/*</excludes>
        </configuration>
      </plugin>
            
    </plugins>
  </build>
</project>
