<?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/maven-v4_0_0.xsd">
  <parent>
    <artifactId>reformcloud2</artifactId>
    <groupId>systems.reformcloud.reformcloud2</groupId>
    <version>2.0.1</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>reformcloud2-runner</artifactId>
  <build>
    <finalName>runner</finalName>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <version>3.0.0</version>
        <executions>
          <execution>
            <id>build-spec-property</id>
            <goals>
              <goal>regex-property</goal>
            </goals>
            <configuration>
              <name>service.spec</name>
              <value>${project.version}</value>
              <regex>(.*)-(.*)</regex>
              <replacement>$2</replacement>
              <failIfNoMatch>false</failIfNoMatch>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <version>3.2.1</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <version>3.2.0</version>
        <configuration>
          <archive>
            <manifestEntries>
              <Premain-Class>systems.reformcloud.reformcloud2.runner.Runner</Premain-Class>
              <Main-Class>systems.reformcloud.reformcloud2.runner.Runner</Main-Class>
              <Version>${project.version}</Version>
              <Implementation-Version>${service.version}</Implementation-Version>
              <Specification-Version>${service.spec}</Specification-Version>
            </manifestEntries>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <version>1.8</version>
        <executions>
          <execution>
            <id>copy</id>
            <phase>validate</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <target>
                <copy />
              </target>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
