<?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>org.kiwiproject</groupId>
        <artifactId>kiwi-parent</artifactId>
        <version>3.0.25</version>
    </parent>

    <artifactId>dropwizard-jakarta-xml-ws-parent</artifactId>
    <version>1.1.6</version>
    <packaging>pom</packaging>

    <name>Dropwizard Jakarta XML Web Services</name>
    <description>
        A Dropwizard Bundle that enables building SOAP web services and client using Jakarta XML Web Services
        in Dropwizard applications.
    </description>
    <url>https://github.com/kiwiproject/dropwizard-jakarta-xml-ws</url>

    <modules>
        <module>dropwizard-jakarta-xml-ws</module>
        <module>dropwizard-jakarta-xml-ws-example</module>
    </modules>

    <properties>
        <cxf.version>4.0.6</cxf.version>
        <jakarta.mail-api.version>2.1.3</jakarta.mail-api.version>
        <angus.mail.version>2.0.3</angus.mail.version>

        <!--
        NOTE:
        We are using Jakarta Persistence and Transaction APIs from Jakarta EE 10 here. I think this will work
        because Dropwizard 4.x is using Hibernate 6.1.x which says (see https://hibernate.org/orm/releases/6.1/)
        it is compatible with both Jakarta Persistence 3.1 (Jakarta EE 10) and 3.0 (Jakarta EE 9).
        The kiwi-bom uses Hibernate 6.3.x which is compatible with Jakarta Persistence 3.1 (Jakarta EE 10)
        and it seems to work fine with Dropwizard 4.x. Plus, Hibernate 6.1.x is EOL (end-of-life) so we
        don't really want to be using it. Also, we are also mandating the JAXB runtime version that is
        Jakarta EE 10 compatible, because even though Dropwizard 4.x is compatible with Jakarta EE 9, it still
        seems to work just fine.
        -->
        <jakarta.persistence-api.version>3.2.0</jakarta.persistence-api.version>
        <jakarta.transaction-api.version>2.0.1</jakarta.transaction-api.version>
        <jakarta.xml.soap-api.version>3.0.2</jakarta.xml.soap-api.version>
        <jaxb-runtime.version>4.0.5</jaxb-runtime.version>
        <kiwi-bom.version>2.0.24</kiwi-bom.version>

        <!-- Sonar properties -->
        <sonar.projectKey>kiwiproject_dropwizard-jakarta-xml-ws</sonar.projectKey>
        <sonar.moduleKey>${project.groupId}:${project.artifactId}</sonar.moduleKey>
        <sonar.organization>kiwiproject</sonar.organization>
        <sonar.host.url>https://sonarcloud.io</sonar.host.url>
    </properties>

    <developers>
        <developer>
            <name>Tadej Roškar</name>
            <email>tadejr@gmail.com</email>
            <timezone>+1</timezone>
            <organizationUrl>https://github.com/roskart</organizationUrl>
        </developer>
        <developer>
            <name>Scott Leberknight</name>
            <organization>Kiwi Project</organization>
            <organizationUrl>https://github.com/kiwiproject</organizationUrl>
            <url>https://github.com/sleberknight</url>
        </developer>
    </developers>

    <licenses>
        <license>
            <name>Apache License 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
            <distribution>manual</distribution>
        </license>
    </licenses>

    <scm>
        <connection>scm:git:https://github.com/kiwiproject/dropwizard-jakarta-xml-ws.git</connection>
        <developerConnection>scm:git:git@github.com:kiwiproject/dropwizard-jakarta-xml-ws.git</developerConnection>
        <url>https://github.com/kiwiproject/dropwizard-jakarta-xml-ws</url>
      <tag>v1.1.6</tag>
  </scm>

    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/kiwiproject/dropwizard-jakarta-xml-ws/issuess</url>
    </issueManagement>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.kiwiproject</groupId>
                <artifactId>kiwi-bom</artifactId>
                <version>${kiwi-bom.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

            <dependency>
                <groupId>jakarta.persistence</groupId>
                <artifactId>jakarta.persistence-api</artifactId>
                <version>${jakarta.persistence-api.version}</version>
            </dependency>

            <dependency>
                <groupId>jakarta.transaction</groupId>
                <artifactId>jakarta.transaction-api</artifactId>
                <version>${jakarta.transaction-api.version}</version>
            </dependency>

            <dependency>
                <groupId>jakarta.xml.soap</groupId>
                <artifactId>jakarta.xml.soap-api</artifactId>
                <version>${jakarta.xml.soap-api.version}</version>
            </dependency>

            <dependency>
                <groupId>org.glassfish.jaxb</groupId>
                <artifactId>jaxb-runtime</artifactId>
                <version>${jaxb-runtime.version}</version>
            </dependency>

            <dependency>
                <groupId>jakarta.mail</groupId>
                <artifactId>jakarta.mail-api</artifactId>
                <version>${jakarta.mail-api.version}</version>
            </dependency>

            <dependency>
                <groupId>org.eclipse.angus</groupId>
                <artifactId>angus-mail</artifactId>
                <version>${angus.mail.version}</version>
            </dependency>

        </dependencies>
    </dependencyManagement>

    <dependencies>
        <!--  nothing to see here...move along...move along... -->
    </dependencies>

    <!--
       NOTE:
       Override the javadoc plugin from kiwi-parent, otherwise javadoc will fail because the generated
       classes won't be found. For now, disable some doclint checks, and customize the source path to
       include generated annotations, cxf-generated classes, and classes in delombok (which will still
       exist because of how the parent POM still runs delombok)
    -->
    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>${maven-javadoc-plugin.version}</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <!-- TODO: fix these and then re-instate the checks -->
                            <doclint>all,-missing,-reference</doclint>

                            <sourcepath>
                                ${project.build.sourceDirectory}:${project.build.directory}/generated-sources/annotations:
                                ${project.build.sourceDirectory}:${project.build.directory}/generated-sources/cxf:
                                ${project.build.sourceDirectory}:${project.build.directory}/generated-sources/delombok
                            </sourcepath>

                            <!-- Make JavaDoc understand the "new" tags introduced in Java 8 (!) -->
                            <tags>
                                <tag>
                                    <name>apiNote</name>
                                    <placement>a</placement>
                                    <head>API Note:</head>
                                </tag>
                                <tag>
                                    <name>implSpec</name>
                                    <placement>a</placement>
                                    <head>Implementation Requirements:</head>
                                </tag>
                                <tag>
                                    <name>implNote</name>
                                    <placement>a</placement>
                                    <head>Implementation Note:</head>
                                </tag>
                            </tags>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
