<?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-integration-tests</artifactId>
        <version>3.37.0</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <artifactId>quarkus-cxf-integration-test-wsdl2java</artifactId>

    <name>Quarkus CXF - Integration Test - wsdl2java</name>

    <dependencies>
        <dependency>
            <groupId>io.quarkiverse.cxf</groupId>
            <artifactId>quarkus-cxf</artifactId>
        </dependency>
        <dependency>
            <groupId>io.quarkiverse.cxf</groupId>
            <artifactId>quarkus-cxf-jaxb-plugins</artifactId>
        </dependency>
        <dependency>
            <groupId>io.quarkiverse.cxf</groupId>
            <artifactId>quarkus-cxf-xjc-plugins</artifactId>
        </dependency>

        <dependency>
            <groupId>io.rest-assured</groupId>
            <artifactId>rest-assured</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>io.quarkus</groupId>
                <artifactId>quarkus-maven-plugin</artifactId>
                <extensions>true</extensions>
                <executions>
                    <execution>
                        <goals>
                            <goal>generate-code-tests</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>add-source</id>
                        <goals>
                            <goal>add-test-source</goal>
                            <goal>add-test-resource</goal>
                        </goals>
                        <phase>generate-sources</phase>
                        <configuration>
                            <sources>
                                <source>target/generated-test-sources/wsdl2java-custom</source>
                                <source>target/generated-test-sources/wsdl2java-jaxb1</source>
                                <source>target/generated-test-sources/wsdl2java-jaxb2</source>
                                <source>target/generated-test-sources/wsdl2java-jaxb3</source>
                                <source>target/generated-test-sources/wsdl2java-elementWrapper</source>
                                <source>target/generated-test-sources/wsdl2java-parentPointer</source>
                                <source>target/generated-test-sources/wsdl2java-simplify</source>
                            </sources>
                            <resources>
                                <resource>
                                    <directory>target/generated-test-sources/wsdl2java-jaxb2</directory>
                                    <includes>
                                        <include>**/*.index</include>
                                    </includes>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <executions>
                    <execution>
                        <!-- Copy the sample code to docs module where Antora can see it -->
                        <id>copy-resources-for-antora</id>
                        <!-- after source formatting -->
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <phase>compile</phase>
                        <configuration>
                            <outputDirectory>${maven.multiModuleProjectDirectory}/docs/modules/ROOT/examples/wsdl2java</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>src/test/resources/wsdl</directory>
                                    <includes>
                                        <include>global-jaxb-bindings.xml</include>
                                    </includes>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <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-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-xjc-plugins-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>
