<?xml version="1.0" encoding="UTF-8"?>
<!--

    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
    this work for additional information regarding copyright ownership.
    The ASF licenses this file to You under the Apache License, Version 2.0
    (the "License"); you may not use this file except in compliance with
    the License.  You may obtain a copy of the License at

         http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

-->
<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>org.apache.camel.quarkus</groupId>
        <artifactId>camel-quarkus-build-parent-it</artifactId>
        <version>3.15.2</version>
        <relativePath>../../poms/build-parent-it/pom.xml</relativePath>
    </parent>

    <artifactId>camel-quarkus-integration-test-cxf-soap-grouped</artifactId>
    <name>Camel Quarkus :: Integration Tests :: Cxf Soap Grouped</name>
    <description>Cxf Soap tests from ../integration-test-groups/cxf-soap merged together</description>

    <!-- Regenerate the dependencies via `mvn process-resources -Pformat -N` from the source tree root directory -->
    <dependencies>
        <dependency>
            <groupId>org.apache.camel.quarkus</groupId>
            <artifactId>camel-quarkus-bean</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel.quarkus</groupId>
            <artifactId>camel-quarkus-direct</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel.quarkus</groupId>
            <artifactId>camel-quarkus-cxf-soap</artifactId>
        </dependency>
        <dependency>
            <groupId>io.quarkiverse.cxf</groupId>
            <artifactId>quarkus-cxf-rt-features-logging</artifactId>
        </dependency>
        <dependency>
            <groupId>io.quarkiverse.cxf</groupId>
            <artifactId>quarkus-cxf-rt-ws-security</artifactId>
        </dependency>
        <dependency>
            <groupId>io.quarkiverse.cxf</groupId>
            <artifactId>quarkus-cxf-services-sts</artifactId>
        </dependency>
        <dependency>
            <groupId>io.quarkiverse.cxf</groupId>
            <artifactId>quarkus-cxf-xjc-plugins</artifactId>
        </dependency>
        <dependency>
            <groupId>io.quarkiverse.cxf</groupId>
            <artifactId>quarkus-cxf-rt-features-metrics</artifactId>
        </dependency>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-micrometer-registry-prometheus</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
        </dependency>
        <dependency><!-- for java.awt.Image -->
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-awt</artifactId>
        </dependency>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-resteasy</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel.quarkus</groupId>
            <artifactId>camel-quarkus-jaxb</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel.quarkus</groupId>
            <artifactId>camel-quarkus-rest</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel.quarkus</groupId>
            <artifactId>camel-quarkus-jackson</artifactId>
        </dependency>

        <!-- test dependencies -->
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-junit5</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.rest-assured</groupId>
            <artifactId>rest-assured</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.testcontainers</groupId>
            <artifactId>testcontainers</artifactId>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>junit</groupId>
                    <artifactId>junit</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-junit4-mock</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.quarkiverse.cxf</groupId>
            <artifactId>quarkus-cxf-test-util</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-test-junit5</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.gmavenplus</groupId>
                <artifactId>gmavenplus-plugin</artifactId>
                <executions>
                    <execution>
                        <id>group-sources</id>
                        <goals>
                            <goal>execute</goal>
                        </goals>
                        <phase>generate-sources</phase>
                        <configuration>
                            <scripts>
                                <script>file:${maven.multiModuleProjectDirectory}/tooling/scripts/group-tests.groovy</script>
                            </scripts>
                            <properties>
                                <group-tests.source.dir>${maven.multiModuleProjectDirectory}/integration-test-groups/cxf-soap</group-tests.source.dir>
                                <group-tests.dest.module.dir>${project.basedir}</group-tests.dest.module.dir>
                                <group-tests.concat.rel.paths>src/main/resources/application.properties</group-tests.concat.rel.paths>
                            </properties>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>${quarkus.platform.group-id}</groupId>
                <artifactId>quarkus-maven-plugin</artifactId>
                <version>${quarkus.platform.version}</version>
                <extensions>true</extensions><!-- Workaround for https://github.com/quarkusio/quarkus/issues/21718 -->
                <executions>
                    <execution>
                        <id>generate-code</id>
                        <goals>
                            <goal>generate-code</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>native</id>
            <activation>
                <property>
                    <name>native</name>
                </property>
            </activation>
            <properties>
                <quarkus.native.enabled>true</quarkus.native.enabled>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-failsafe-plugin</artifactId>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>integration-test</goal>
                                    <goal>verify</goal>
                                </goals>
                            </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>org.apache.camel.quarkus</groupId>
                    <artifactId>camel-quarkus-bean-deployment</artifactId>
                    <version>${project.version}</version>
                    <type>pom</type>
                    <scope>test</scope>
                    <exclusions>
                        <exclusion>
                            <groupId>*</groupId>
                            <artifactId>*</artifactId>
                        </exclusion>
                    </exclusions>
                </dependency>
                <dependency>
                    <groupId>org.apache.camel.quarkus</groupId>
                    <artifactId>camel-quarkus-cxf-soap-deployment</artifactId>
                    <version>${project.version}</version>
                    <type>pom</type>
                    <scope>test</scope>
                    <exclusions>
                        <exclusion>
                            <groupId>*</groupId>
                            <artifactId>*</artifactId>
                        </exclusion>
                    </exclusions>
                </dependency>
                <dependency>
                    <groupId>org.apache.camel.quarkus</groupId>
                    <artifactId>camel-quarkus-direct-deployment</artifactId>
                    <version>${project.version}</version>
                    <type>pom</type>
                    <scope>test</scope>
                    <exclusions>
                        <exclusion>
                            <groupId>*</groupId>
                            <artifactId>*</artifactId>
                        </exclusion>
                    </exclusions>
                </dependency>
                <dependency>
                    <groupId>org.apache.camel.quarkus</groupId>
                    <artifactId>camel-quarkus-jackson-deployment</artifactId>
                    <version>${project.version}</version>
                    <type>pom</type>
                    <scope>test</scope>
                    <exclusions>
                        <exclusion>
                            <groupId>*</groupId>
                            <artifactId>*</artifactId>
                        </exclusion>
                    </exclusions>
                </dependency>
                <dependency>
                    <groupId>org.apache.camel.quarkus</groupId>
                    <artifactId>camel-quarkus-jaxb-deployment</artifactId>
                    <version>${project.version}</version>
                    <type>pom</type>
                    <scope>test</scope>
                    <exclusions>
                        <exclusion>
                            <groupId>*</groupId>
                            <artifactId>*</artifactId>
                        </exclusion>
                    </exclusions>
                </dependency>
                <dependency>
                    <groupId>org.apache.camel.quarkus</groupId>
                    <artifactId>camel-quarkus-rest-deployment</artifactId>
                    <version>${project.version}</version>
                    <type>pom</type>
                    <scope>test</scope>
                    <exclusions>
                        <exclusion>
                            <groupId>*</groupId>
                            <artifactId>*</artifactId>
                        </exclusion>
                    </exclusions>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>full</id>
            <activation>
                <property>
                    <name>!quickly</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>keytool-maven-plugin</artifactId>
                        <configuration>
                            <keypass>password</keypass>
                            <validity>18250</validity>
                            <keyalg>RSA</keyalg>
                            <storepass>password</storepass>
                        </configuration>
                        <executions>
                            <execution>
                                <id>generate-cxfca-keypair</id>
                                <phase>generate-sources</phase>
                                <goals>
                                    <goal>clean</goal>
                                    <goal>generateKeyPair</goal>
                                </goals>
                                <configuration>
                                    <alias>cxfca</alias>
                                    <dname>CN=cxfca, OU=eng, O=apache.org</dname>
                                    <exts>
                                        <ext>bc:c=ca:true,pathlen:2147483647</ext>
                                        <ext>IssuerAlternativeName=DNS:NOT-FOR-PRODUCTION-USE</ext>
                                    </exts>
                                    <keystore>${project.build.outputDirectory}/cxfca.jks</keystore>
                                </configuration>
                            </execution>
                            <execution>
                                <id>export-cxfca-certificate</id>
                                <phase>generate-sources</phase>
                                <goals>
                                    <goal>exportCertificate</goal>
                                </goals>
                                <configuration>
                                    <alias>cxfca</alias>
                                    <keystore>${project.build.outputDirectory}/cxfca.jks</keystore>
                                    <rfc>true</rfc>
                                    <file>${project.build.outputDirectory}/cxfca.pem</file>
                                </configuration>
                            </execution>
                            <execution>
                                <id>generate-alice-keypair</id>
                                <phase>generate-sources</phase>
                                <goals>
                                    <goal>clean</goal>
                                    <goal>generateKeyPair</goal>
                                </goals>
                                <configuration>
                                    <alias>alice</alias>
                                    <dname>CN=alice, OU=eng, O=apache.org</dname>
                                    <exts>
                                        <ext>IssuerAlternativeName=DNS:NOT-FOR-PRODUCTION-USE</ext>
                                        <ext>SubjectAlternativeName=DNS:localhost,IP:127.0.0.1</ext>
                                    </exts>
                                    <keystore>${project.build.outputDirectory}/alice.jks</keystore>
                                </configuration>
                            </execution>
                            <execution>
                                <id>generate-bob-keypair</id>
                                <phase>generate-sources</phase>
                                <goals>
                                    <goal>clean</goal>
                                    <goal>generateKeyPair</goal>
                                </goals>
                                <configuration>
                                    <alias>bob</alias>
                                    <dname>CN=bob, OU=eng, O=apache.org</dname>
                                    <exts>
                                        <ext>IssuerAlternativeName=DNS:NOT-FOR-PRODUCTION-USE</ext>
                                        <ext>SubjectAlternativeName=DNS:localhost,IP:127.0.0.1</ext>
                                    </exts>
                                    <keystore>${project.build.outputDirectory}/bob.jks</keystore>
                                </configuration>
                            </execution>
                            <execution>
                                <id>generate-alice-certificate-request</id>
                                <phase>generate-sources</phase>
                                <goals>
                                    <goal>generateCertificateRequest</goal>
                                </goals>
                                <configuration>
                                    <alias>alice</alias>
                                    <keystore>${project.build.outputDirectory}/alice.jks</keystore>
                                    <file>${project.build.outputDirectory}/alice.csr</file>
                                </configuration>
                            </execution>
                            <execution>
                                <id>generate-alice-certificate</id>
                                <phase>generate-sources</phase>
                                <goals>
                                    <goal>generateCertificate</goal>
                                </goals>
                                <configuration>
                                    <alias>cxfca</alias>
                                    <keystore>${project.build.outputDirectory}/cxfca.jks</keystore>
                                    <rfc>true</rfc>
                                    <infile>${project.build.outputDirectory}/alice.csr</infile>
                                    <outfile>${project.build.outputDirectory}/alice.pem</outfile>
                                </configuration>
                            </execution>
                            <execution>
                                <id>generate-bob-certificate-request</id>
                                <phase>generate-sources</phase>
                                <goals>
                                    <goal>generateCertificateRequest</goal>
                                </goals>
                                <configuration>
                                    <alias>bob</alias>
                                    <keystore>${project.build.outputDirectory}/bob.jks</keystore>
                                    <file>${project.build.outputDirectory}/bob.csr</file>
                                </configuration>
                            </execution>
                            <execution>
                                <id>generate-bob-certificate</id>
                                <phase>generate-sources</phase>
                                <goals>
                                    <goal>generateCertificate</goal>
                                </goals>
                                <configuration>
                                    <alias>cxfca</alias>
                                    <keystore>${project.build.outputDirectory}/cxfca.jks</keystore>
                                    <rfc>true</rfc>
                                    <infile>${project.build.outputDirectory}/bob.csr</infile>
                                    <outfile>${project.build.outputDirectory}/bob.pem</outfile>
                                </configuration>
                            </execution>
                            <execution>
                                <id>import-cxfca-certificate-to-alice</id>
                                <phase>generate-sources</phase>
                                <goals>
                                    <goal>importCertificate</goal>
                                </goals>
                                <configuration>
                                    <alias>cxfca</alias>
                                    <trustcacerts>true</trustcacerts>
                                    <noprompt>true</noprompt>
                                    <keystore>${project.build.outputDirectory}/alice.jks</keystore>
                                    <file>${project.build.outputDirectory}/cxfca.pem</file>
                                </configuration>
                            </execution>
                            <execution>
                                <id>import-cxfca-certificate-to-bob</id>
                                <phase>generate-sources</phase>
                                <goals>
                                    <goal>importCertificate</goal>
                                </goals>
                                <configuration>
                                    <alias>cxfca</alias>
                                    <trustcacerts>true</trustcacerts>
                                    <noprompt>true</noprompt>
                                    <keystore>${project.build.outputDirectory}/bob.jks</keystore>
                                    <file>${project.build.outputDirectory}/cxfca.pem</file>
                                </configuration>
                            </execution>
                            <execution>
                                <id>import-alice-certificate</id>
                                <phase>generate-sources</phase>
                                <goals>
                                    <goal>importCertificate</goal>
                                </goals>
                                <configuration>
                                    <alias>alice</alias>
                                    <trustcacerts>true</trustcacerts>
                                    <noprompt>true</noprompt>
                                    <keystore>${project.build.outputDirectory}/alice.jks</keystore>
                                    <file>${project.build.outputDirectory}/alice.pem</file>
                                </configuration>
                            </execution>
                            <execution>
                                <id>import-bob-certificate</id>
                                <phase>generate-sources</phase>
                                <goals>
                                    <goal>importCertificate</goal>
                                </goals>
                                <configuration>
                                    <alias>bob</alias>
                                    <trustcacerts>true</trustcacerts>
                                    <noprompt>true</noprompt>
                                    <keystore>${project.build.outputDirectory}/bob.jks</keystore>
                                    <file>${project.build.outputDirectory}/bob.pem</file>
                                </configuration>
                            </execution>
                            <execution>
                                <id>import-bob-certificate-to-alice</id>
                                <phase>generate-sources</phase>
                                <goals>
                                    <goal>importCertificate</goal>
                                </goals>
                                <configuration>
                                    <alias>bob</alias>
                                    <trustcacerts>true</trustcacerts>
                                    <noprompt>true</noprompt>
                                    <keystore>${project.build.outputDirectory}/alice.jks</keystore>
                                    <file>${project.build.outputDirectory}/bob.pem</file>
                                </configuration>
                            </execution>
                            <execution>
                                <id>import-alice-certificate-to-bob</id>
                                <phase>generate-sources</phase>
                                <goals>
                                    <goal>importCertificate</goal>
                                </goals>
                                <configuration>
                                    <alias>alice</alias>
                                    <trustcacerts>true</trustcacerts>
                                    <noprompt>true</noprompt>
                                    <keystore>${project.build.outputDirectory}/bob.jks</keystore>
                                    <file>${project.build.outputDirectory}/alice.pem</file>
                                </configuration>
                            </execution>
        <!--                Uncomment execution block below for local testing -->
        <!--                    <execution>-->
        <!--                        <id>list</id>-->
        <!--                        <phase>generate-sources</phase>-->
        <!--                        <goals>-->
        <!--                            <goal>list</goal>-->
        <!--                        </goals>-->
        <!--                        <configuration>-->
        <!--                            <verbose>true</verbose>-->
        <!--                            <keystore>${project.build.outputDirectory}/bob.jks</keystore>-->
        <!--                        </configuration>-->
        <!--                    </execution>-->
                            <execution>
                                <id>generate-server-keypair</id>
                                <phase>generate-sources</phase>
                                <goals>
                                    <goal>clean</goal>
                                    <goal>generateKeyPair</goal>
                                </goals>
                                <configuration>
                                    <alias>localhost</alias>
                                    <dname>CN=localhost, OU=eng, O=apache.org</dname>
                                    <exts>
                                        <ext>bc:c=ca:true,pathlen:2147483647</ext>
                                        <ext>IssuerAlternativeName=DNS:NOT-FOR-PRODUCTION-USE</ext>
                                    </exts>
                                    <keystore>${project.build.outputDirectory}/truststore-server.jks</keystore>
                                </configuration>
                            </execution>
                            <execution>
                                <id>export-server-certificate</id>
                                <phase>generate-sources</phase>
                                <goals>
                                    <goal>exportCertificate</goal>
                                </goals>
                                <configuration>
                                    <alias>localhost</alias>
                                    <keystore>${project.build.outputDirectory}/truststore-server.jks</keystore>
                                    <rfc>true</rfc>
                                    <file>${project.build.outputDirectory}/localhost.pem</file>
                                </configuration>
                            </execution>
                            <execution>
                                <id>create-client-trusstore</id>
                                <phase>generate-sources</phase>
                                <goals>
                                    <goal>clean</goal>
                                    <goal>importCertificate</goal>
                                </goals>
                                <configuration>
                                    <alias>localhost</alias>
                                    <trustcacerts>true</trustcacerts>
                                    <noprompt>true</noprompt>
                                    <keystore>${project.build.outputDirectory}/truststore-client.jks</keystore>
                                    <file>${project.build.outputDirectory}/localhost.pem</file>
                                </configuration>
                            </execution>
                            <execution>
                                <id>generate-wrong-trusstore</id>
                                <phase>generate-sources</phase>
                                <goals>
                                    <goal>clean</goal>
                                    <goal>generateKeyPair</goal>
                                </goals>
                                <configuration>
                                    <alias>localhost</alias>
                                    <dname>CN=localhost, OU=eng, O=apache.org</dname>
                                    <exts>
                                        <ext>bc:c=ca:true,pathlen:2147483647</ext>
                                        <ext>IssuerAlternativeName=DNS:NOT-FOR-PRODUCTION-USE</ext>
                                    </exts>
                                    <keystore>${project.build.outputDirectory}/truststore-wrong.jks</keystore>
                                </configuration>
                            </execution>
                            <execution>
                                <id>generate-alice-wrong-keypair</id>
                                <phase>generate-sources</phase>
                                <goals>
                                    <goal>clean</goal>
                                    <goal>generateKeyPair</goal>
                                </goals>
                                <configuration>
                                    <alias>alice_wrong</alias>
                                    <dname>CN=alice_wrong, OU=eng, O=apache.org</dname>
                                    <exts>
                                        <ext>IssuerAlternativeName=DNS:NOT-FOR-PRODUCTION-USE</ext>
                                        <ext>SubjectAlternativeName=DNS:localhost,IP:127.0.0.1</ext>
                                    </exts>
                                    <keystore>${project.build.outputDirectory}/alice_wrong.jks</keystore>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>skip-testcontainers-tests</id>
            <activation>
                <property>
                    <name>skip-testcontainers-tests</name>
                </property>
            </activation>
            <properties>
                <skipTests>true</skipTests>
            </properties>
        </profile>
    </profiles>

</project>
