<?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">

    <parent>
        <groupId>org.kiwiproject</groupId>
        <artifactId>dropwizard-jakarta-xml-ws-parent</artifactId>
        <version>2.0.3</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>dropwizard-jakarta-xml-ws-example</artifactId>
    <name>Dropwizard Jakarta XML Web Services Example Application</name>

    <properties>
        <maven-shade-plugin.version>3.6.1</maven-shade-plugin.version>
    </properties>

    <dependencies>

        <dependency>
            <groupId>org.kiwiproject</groupId>
            <artifactId>dropwizard-jakarta-xml-ws</artifactId>
            <version>2.0.3</version>
        </dependency>

        <dependency>
            <groupId>io.dropwizard</groupId>
            <artifactId>dropwizard-core</artifactId>
        </dependency>

        <dependency>
            <groupId>io.dropwizard</groupId>
            <artifactId>dropwizard-auth</artifactId>
        </dependency>

        <dependency>
            <groupId>io.dropwizard</groupId>
            <artifactId>dropwizard-hibernate</artifactId>
        </dependency>

        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
        </dependency>

        <dependency>
            <groupId>jakarta.mail</groupId>
            <artifactId>jakarta.mail-api</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-features-logging</artifactId>
        </dependency>

        <dependency>
            <groupId>com.sun.xml.messaging.saaj</groupId>
            <artifactId>saaj-impl</artifactId>
        </dependency>

    </dependencies>

    <build>

        <plugins>

            <!-- CXF WSDL-to-Java code generation for WsdlFirstService -->
            <plugin>
                <groupId>org.apache.cxf</groupId>
                <artifactId>cxf-codegen-plugin</artifactId>
                <version>${cxf.version}</version>
                <executions>
                    <execution>
                        <id>generate-sources</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>wsdl2java</goal>
                        </goals>
                        <configuration>
                            <wsdlOptions>
                                <wsdlOption>
                                    <wsdl>${basedir}/src/main/resources/META-INF/WsdlFirstService.wsdl</wsdl>
                                </wsdlOption>
                                <wsdlOption>
                                    <wsdl>${basedir}/src/main/resources/META-INF/MtomService.wsdl</wsdl>
                                </wsdlOption>
                            </wsdlOptions>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <!--
            NOTE:
            Until this example module is moved into a separate repository, we don't want to deploy a
            large shaded "uber-jar" to Maven Central, so this will remain commented out.
            -->
            <!--
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-shade-plugin</artifactId>
                            <version>${maven-shade-plugin.version}</version>
                            <configuration>
                                <createDependencyReducedPom>false</createDependencyReducedPom>
                                <filters>
                                    <filter>
                                        <artifact>*:*</artifact>
                                        <excludes>
                                            <exclude>META-INF/*.SF</exclude>
                                            <exclude>META-INF/*.DSA</exclude>
                                            <exclude>META-INF/*.RSA</exclude>
                                            <exclude>module-info.class</exclude>
                                        </excludes>
                                    </filter>
                                </filters>
                            </configuration>
                            <executions>
                                <execution>
                                    <phase>package</phase>
                                    <goals>
                                        <goal>shade</goal>
                                    </goals>
                                    <configuration>
                                        <transformers>
                                            <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
                                            <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                                                <mainClass>org.kiwiproject.dropwizard.jakarta.xml.ws.example.JakartaXmlWsExampleApplication</mainClass>
                                            </transformer>
                                            <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
                                                <resource>META-INF/cxf/bus-extensions.txt</resource>
                                            </transformer>
                                        </transformers>
                                    </configuration>
                                </execution>
                            </executions>
                        </plugin>
            -->
        </plugins>
    </build>

</project>
