<?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>
    <parent>
        <artifactId>jardis</artifactId>
        <groupId>com.smeup.jardis</groupId>
        <version>v2.1.0</version>
    </parent>

    <artifactId>jariko</artifactId>
    <version>v2.1.0</version>
    <name>Jardis jariko</name>

    <repositories>
        <repository>
            <id>sonatype.snapshots</id>
            <url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>sonatype.releases</id>
            <url>https://s01.oss.sonatype.org/content/repositories/releases/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>smeup</id>
            <url>https://repo.smeup.cloud/nexus/repository/public/</url>
        </repository>
        <repository>
            <id>jitpack.io</id>
            <url>https://jitpack.io</url>
        </repository>
    </repositories>

    <dependencies>
        <dependency>
            <groupId>com.smeup.jardis</groupId>
            <artifactId>core</artifactId>
            <version>v2.1.0</version>
        </dependency>
        <dependency>
            <groupId>com.smeup.jardis</groupId>
            <artifactId>endpoint</artifactId>
            <version>v2.1.0</version>
        </dependency>
        <dependency>
            <groupId>io.github.smeup.jariko</groupId>
            <artifactId>rpgJavaInterpreter-core</artifactId>
            <version>v2.1.0</version>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>ItsTests</id>
            <properties>
                <testcase.groups>com.smeup.jardis.jariko.categories.ItsTests</testcase.groups>
            </properties>
        </profile>
        <profile>
            <id>UnitTests</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <properties>
                <testcase.excludedGroups>com.smeup.jardis.jariko.categories.ItsTests</testcase.excludedGroups>
            </properties>
        </profile>
        <profile>
            <id>ShadeProfile</id>
            <build>
                <plugins>
                    <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>
                                <configuration>
                                    <transformers>
                                        <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                                            <mainClass>com.smeup.jardis.jariko.endpoint.Jardis</mainClass>
                                        </transformer>
                                    </transformers>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <build>
        <finalName>jardis-jariko</finalName>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <version>3.0.0</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>java</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <mainClass>com.smeup.jardis.jariko.endpoint.Jardis</mainClass>
                    <systemProperties>
                        <systemProperty>
                            <key>jardis.localWorkspace</key>
                            <value>user</value>
                        </systemProperty>
                    </systemProperties>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.2.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.3.2</version>
                <configuration>
                    <failOnError>false</failOnError>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.22.1</version>
                <configuration>
                    <groups>${testcase.groups}</groups>
                    <excludedGroups>${testcase.excludedGroups}</excludedGroups>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>
