<?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.neomatrix369.deepnetts</groupId>
  <artifactId>deepnetts-machine</artifactId>
  <version>1.0</version>

  <name>deepnetts-machine</name>
  <packaging>jar</packaging>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.source>8</maven.compiler.source>
    <maven.compiler.target>8</maven.compiler.target>
    <maven-shade-plugin.version>2.4.3</maven-shade-plugin.version>
    <exec-maven-plugin.version>1.4.0</exec-maven-plugin.version>
    <shadedClassifier>with-dependencies</shadedClassifier>
  </properties>

  <dependencies>
      <dependency>
          <groupId>javax.visrec</groupId>
          <artifactId>visrec-api</artifactId>
          <version>1.0.0</version>
      </dependency>
      <dependency>
          <groupId>javax.visrec</groupId>
          <artifactId>visrec-ri</artifactId>
          <version>1.0.0</version>
          <type>jar</type>
          <exclusions>
              <exclusion>
                  <groupId>com.deepnetts</groupId>
                  <artifactId>deepnetts-core</artifactId>
              </exclusion>
          </exclusions>
      </dependency>
      <dependency>
          <groupId>org.knowm.xchart</groupId>
          <artifactId>xchart</artifactId>
          <version>3.5.2</version>
      </dependency>
    <dependency>
        <groupId>com.deepnetts</groupId>
        <artifactId>deepnetts-core</artifactId>
        <version>1.12</version>
    </dependency>      
  </dependencies>

  <build>
      <plugins>
          <plugin>
              <groupId>org.codehaus.mojo</groupId>
              <artifactId>exec-maven-plugin</artifactId>
              <version>${exec-maven-plugin.version}</version>
              <executions>
                  <execution>
                      <goals>
                          <goal>exec</goal>
                      </goals>
                  </execution>
              </executions>
              <configuration>
                  <executable>java</executable>
              </configuration>
          </plugin>
          <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-shade-plugin</artifactId>
              <version>${maven-shade-plugin.version}</version>
              <configuration>
                  <shadedArtifactAttached>true</shadedArtifactAttached>
                  <shadedClassifierName>${shadedClassifier}</shadedClassifierName>
                  <createDependencyReducedPom>true</createDependencyReducedPom>
                  <filters>
                      <filter>
                          <artifact>*:*</artifact>
                          <excludes>
                              <exclude>META-INF/*.SF</exclude>
                              <exclude>META-INF/*.DSA</exclude>
                              <exclude>META-INF/*.RSA</exclude>
                          </excludes>
                      </filter>
                  </filters>

              </configuration>

              <executions>
                  <execution>
                      <phase>package</phase>
                      <goals>
                          <goal>shade</goal>
                      </goals>
                      <configuration>
                          <transformers>
                              <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
                              <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                                  <mainClass>org.neomatrix369.deepnetts.DeepNettsMachine</mainClass>
                              </transformer>
                          </transformers>
                      </configuration>
                  </execution>
              </executions>
          </plugin>

          <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-compiler-plugin</artifactId>
              <version>3.5.1</version>
              <configuration>
                  <source>${maven.compiler.source}</source>
                  <target>${maven.compiler.target}</target>
              </configuration>
          </plugin>
      </plugins>
  </build>

</project>
