<?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>
        <groupId>io.quarkiverse.cxf</groupId>
        <artifactId>quarkus-cxf-test-util-parent</artifactId>
        <version>2.7.1</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <artifactId>quarkus-cxf-test-ws-rm-server-native</artifactId>

    <name>Quarkus CXF - Test WS-ReliableMessaging Server - Native runner</name>
    <description>The application containing the service for testing re-delivery of dropped messages with WS-ReliableMessaging</description>

    <properties>
        <!-- Allow running our tests against alternative BOMs, such as io.quarkus.platform:quarkus-cxf-bom -->
        <quarkus.platform.group-id>io.quarkus</quarkus.platform.group-id>
        <quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
        <quarkus.platform.version>${quarkus.version}</quarkus.platform.version>
        <quarkus-cxf.platform.group-id>io.quarkiverse.cxf</quarkus-cxf.platform.group-id>
        <quarkus-cxf.platform.artifact-id>quarkus-cxf-bom</quarkus-cxf.platform.artifact-id>
        <quarkus-cxf.platform.version>2.7.1</quarkus-cxf.platform.version>
        <quarkus-cxf.version>2.7.1</quarkus-cxf.version><!-- This needs to be set to the underlying Quarkiverse CXF version from command line when testing against Platform BOMs -->

        <maven.compiler.parameters>true</maven.compiler.parameters>
        
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>${quarkus.platform.group-id}</groupId>
                <artifactId>${quarkus.platform.artifact-id}</artifactId>
                <version>${quarkus.platform.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>${quarkus-cxf.platform.group-id}</groupId>
                <artifactId>${quarkus-cxf.platform.artifact-id}</artifactId>
                <version>${quarkus-cxf.platform.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>io.quarkiverse.cxf</groupId>
                <artifactId>quarkus-cxf-bom-test</artifactId>
                <version>${quarkus-cxf.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>io.quarkiverse.cxf</groupId>
            <artifactId>quarkus-cxf-test-ws-rm-server-jvm</artifactId>
            <type>pom</type><!-- Just build after the jvm module -->
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>unpack-quarkus-cxf-test-ws-rm-server-jvm</id>
                        <phase>process-sources</phase>
                        <goals>
                            <goal>unpack</goal>
                        </goals>
                        <configuration>
                            <artifact>io.quarkiverse.cxf:quarkus-cxf-test-ws-rm-server-jvm:${project.version}</artifact>
                            <excludes>application.properties</excludes>
                            <outputDirectory>${project.build.directory}/classes</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>io.quarkus</groupId>
                <artifactId>quarkus-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>build</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>native</id><!-- Keep in sync with the release profile below -->
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <properties>
                <quarkus.package.type>native</quarkus.package.type>
                <quarkus.native.container-build>true</quarkus.native.container-build>
                <quarkus.build.skip>false</quarkus.build.skip>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>build-helper-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-exe</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>attach-artifact</goal>
                                </goals>
                                <configuration>
                                    <artifacts>
                                        <artifact>
                                            <file>${project.build.directory}/${project.artifactId}-${project.version}-runner</file>
                                            <type>exe</type>
                                        </artifact>
                                    </artifacts>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>release</id><!-- Keep in sync with the native profile above -->
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <properties>
                <quarkus.package.type>native</quarkus.package.type>
                <quarkus.native.container-build>true</quarkus.native.container-build>
                <quarkus.build.skip>false</quarkus.build.skip>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>build-helper-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-exe</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>attach-artifact</goal>
                                </goals>
                                <configuration>
                                    <artifacts>
                                        <artifact>
                                            <file>${project.build.directory}/${project.artifactId}-${project.version}-runner</file>
                                            <type>exe</type>
                                        </artifact>
                                    </artifacts>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>virtualDependencies</id>
            <activation>
                <property>
                    <name>!noVirtualDependencies</name>
                </property>
            </activation>
            <dependencies>
                <!-- The following dependencies guarantee that this module is built after them. You can update them by running `mvn process-resources -Pformat -N` from the source tree root directory -->
                <dependency>
                    <groupId>io.quarkiverse.cxf</groupId>
                    <artifactId>quarkus-cxf-rt-features-logging-deployment</artifactId>
                    <version>${project.version}</version>
                    <type>pom</type>
                    <scope>test</scope>
                    <exclusions>
                        <exclusion>
                            <groupId>*</groupId>
                            <artifactId>*</artifactId>
                        </exclusion>
                    </exclusions>
                </dependency>
                <dependency>
                    <groupId>io.quarkiverse.cxf</groupId>
                    <artifactId>quarkus-cxf-rt-ws-rm-deployment</artifactId>
                    <version>${project.version}</version>
                    <type>pom</type>
                    <scope>test</scope>
                    <exclusions>
                        <exclusion>
                            <groupId>*</groupId>
                            <artifactId>*</artifactId>
                        </exclusion>
                    </exclusions>
                </dependency>
            </dependencies>
        </profile>
    </profiles>

</project>