<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>

  <parent>
    <groupId>io.operon</groupId>
    <artifactId>operon-core-parent</artifactId>
    <version>0.9.0-RELEASE</version>
  </parent>

  <groupId>io.operon</groupId>
  <artifactId>operon-runner</artifactId>
  <name>Operon runner</name>
  <packaging>jar</packaging>

  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <dependencies>
    <dependency>
      <groupId>org.antlr</groupId>
      <artifactId>antlr4-runtime</artifactId>
      <version>${antlr.version}</version>
    </dependency>

    <dependency>
      <groupId>io.operon</groupId>
      <artifactId>operon-parser</artifactId>
      <version>${project.parent.version}</version>
    </dependency>

    <dependency>
      <groupId>io.operon</groupId>
      <artifactId>operon-json-parser</artifactId>
      <version>${project.parent.version}</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/org.redisson/redisson -->
    <dependency>
        <groupId>org.redisson</groupId>
        <artifactId>redisson</artifactId>
        <version>3.15.3</version>
        <scope>test</scope>
    </dependency>

    <!-- https://mvnrepository.com/artifact/redis.clients/jedis -->
    <dependency>
        <groupId>redis.clients</groupId>
        <artifactId>jedis</artifactId>
        <version>3.5.2</version>
    </dependency>

    <!-- for running certain type of integration-components -->
    <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-exec</artifactId>
        <version>1.3</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api -->
    <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter-api</artifactId>
        <version>5.6.0</version>
        <scope>test</scope>
    </dependency>

    <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter-engine</artifactId>
        <version>5.6.0</version>
        <scope>test</scope>
    </dependency>

    <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-api</artifactId>
        <version>2.17.0</version>
    </dependency>
    
    <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-core</artifactId>
        <version>2.17.0</version>
    </dependency>

    <!-- for building the native-image -->
    <dependency>
        <groupId>org.graalvm.sdk</groupId>
        <artifactId>graal-sdk</artifactId>
        <version>${graalvm.version}</version>
        <scope>provided</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.22.2</version>
        <!-- argument dash dash illegal-access=permit to allow all reflection access for third party libraries:
        <configuration>
            <argLine>
                dash dahs illegal-access=permit
            </argLine>
        </configuration>
        -->
      </plugin>
    
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.8.1</version>
        <!-- Run this configuration often -->
        <configuration>
          <!--compilerArgs>
            <arg>-verbose</arg>
            <arg>-Xlint:all,-options,-path</arg>
          </compilerArgs-->
        </configuration>
      </plugin>
    
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-shade-plugin</artifactId>
        <version>3.2.4</version>
        <executions>
          <execution>
            <phase>package</phase>
              <goals>
                <goal>shade</goal>
              </goals>
          </execution>
        </executions>
        <configuration>
            <finalName>uber-${project.artifactId}-${project.version}</finalName>
        </configuration>
      </plugin>

      <!-- Make this jar executable -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>3.2.0</version>
        <configuration>
          <!-- DO NOT include log4j.properties file in your Jar -->
          <excludes>
            <exclude>**/log4j.properties</exclude>
          </excludes>
          <archive>
            <manifest>
            <!-- Jar file entry point -->
              <mainClass>io.operon.runner.Main</mainClass>
            </manifest>
            <manifestEntries>
              <Built-By>operon.io</Built-By>
              <Build-Jdk>11</Build-Jdk>
            </manifestEntries>
          </archive>
        </configuration>
      </plugin>

      <!-- 
        Show the latest versions of the plugins:
        mvn versions:display-plugin-updates 
        
        Show the latest versions of modules:
        mvn versions:display-dependency-updates
        -->
      <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-javadoc-plugin</artifactId>
        <version>3.2.0</version>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
    <extensions>
        <extension>
            <groupId>org.apache.maven.wagon</groupId>
            <artifactId>wagon-ssh</artifactId>
            <version>3.4.3</version>
        </extension>
    </extensions>
  </build>
</project>