<?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">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.eclipse.mosaic</groupId>
        <artifactId>mosaic-parent</artifactId>
        <version>25.2</version>
        <relativePath>../../pom.xml</relativePath>
    </parent>

    <artifactId>mosaic-rti-core</artifactId>
    <name>Eclipse MOSAIC Runtime Infrastructure Implementation</name>
    <url>https://github.com/eclipse-mosaic/mosaic</url>

    <properties>
        <skip.jar-test-creation>true</skip.jar-test-creation>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.eclipse.mosaic</groupId>
            <artifactId>mosaic-rti-api</artifactId>
            <version>${mosaic.version}</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.mosaic</groupId>
            <artifactId>mosaic-utils</artifactId>
            <version>${mosaic.version}</version>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
        </dependency>
        <dependency>
            <groupId>com.github.mwiede</groupId>
            <artifactId>jsch</artifactId>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <executions>
                    <execution>
                        <id>create-jar-for-federation-management</id>
                        <phase>process-test-classes</phase>
                        <configuration>
                            <!-- We skip this by default. Otherwise this jar would be deployed to Nexus. -->
                            <skip>${skip.jar-test-creation}</skip>
                            <archive>
                                <manifest>
                                    <mainClass>org.eclipse.mosaic.rti.junit.TestFederateProcess</mainClass>
                                </manifest>
                            </archive>
                            <excludes>
                                <exclude>*.jar</exclude>
                            </excludes>
                            <classifier/>
                            <finalName>TestFederate</finalName>
                            <outputDirectory>${project.build.testSourceDirectory}</outputDirectory>
                        </configuration>
                        <goals>
                            <goal>test-jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>recreate-test-jar</id>
            <properties>
                <skip.jar-test-creation>false</skip.jar-test-creation>
            </properties>
        </profile>
    </profiles>

</project>
