<?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 POM ***************** -->
   <!-- ********************************************** -->

   <parent>
      <groupId>com.bernardomg.maven</groupId>
      <artifactId>base-pom</artifactId>
      <version>1.5.11</version>
   </parent>

   <!-- ********************************************** -->
   <!-- **************** PROJECT INFO **************** -->
   <!-- ********************************************** -->

   <groupId>com.bernardomg.framework.spring</groupId>
   <artifactId>spring-ws-starter</artifactId>
   <version>0.2.2</version>
   <packaging>jar</packaging>

   <name>Starter for Spring Web Services</name>
   <description>Starter for Spring Web Services.</description>
   <url>https://github.com/bernardo-mg/spring-ws-starter</url>
   <inceptionYear>2023</inceptionYear>

   <licenses>
      <license>
         <name>MIT License</name>
         <url>http://www.opensource.org/licenses/mit-license.php</url>
         <distribution>repo</distribution>
      </license>
   </licenses>

   <!-- ********************************************** -->
   <!-- ************ RESOURCES AND SERVICES ********** -->
   <!-- ********************************************** -->

   <scm>
      <connection>scm:git:https://github.com/bernardo-mg/spring-ws-starter.git</connection>
      <developerConnection>scm:git:https://github.com/bernardo-mg/spring-ws-starter.git</developerConnection>
      <tag>head</tag>
      <url>https://www.github.com/bernardo-mg/spring-ws-starter</url>
   </scm>

   <issueManagement>
      <system>GitHub</system>
      <url>https://www.github.com/bernardo-mg/spring-ws-starter/issues</url>
   </issueManagement>

   <ciManagement>
      <system>Github</system>
      <url>https://www.github.com/bernardo-mg/spring-ws-starter/actions</url>
      <notifiers />
   </ciManagement>

   <!-- ********************************************** -->
   <!-- ****************** PROFILES ****************** -->
   <!-- ********************************************** -->

   <profiles>
      <!-- ============================================== -->
      <!-- ============ DEPLOYMENT PROFILES ============= -->
      <!-- ============================================== -->
      <profile>
         <!-- Site deployment profile -->
         <!-- Sets the site repository to point to the releases repo -->
         <id>deployment-site</id>
         <activation>
            <!-- Active by default so the repository appears in the reports -->
            <activeByDefault>true</activeByDefault>
         </activation>
         <distributionManagement>
            <site>
               <id>site</id>
               <name>Project Documentation Site</name>
               <!-- The URL should be set externally -->
               <url>${site.url}</url>
            </site>
         </distributionManagement>
      </profile>
      <profile>
         <!-- Github deployment profile. -->
         <id>deployment-github</id>
         <distributionManagement>
            <repository>
               <!-- Github repository -->
               <id>github</id>
               <name>GitHub Packages</name>
               <url>https://maven.pkg.github.com/bernardo-mg/spring-ws-starter</url>
            </repository>
         </distributionManagement>
      </profile>
      <profile>
         <!-- Central deployment profile. -->
         <id>deployment-central</id>
         <build>
            <plugins>
               <plugin>
                  <!-- GPG -->
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-gpg-plugin</artifactId>
                  <executions>
                     <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                           <goal>sign</goal>
                        </goals>
                     </execution>
                  </executions>
                  <configuration>
                     <!-- Prevent gpg from using pinentry programs -->
                     <gpgArguments>
                        <arg>--pinentry-mode</arg>
                        <arg>loopback</arg>
                     </gpgArguments>
                  </configuration>
               </plugin>
               <plugin>
                  <!-- Maven Central publishing -->
                  <groupId>org.sonatype.central</groupId>
                  <artifactId>central-publishing-maven-plugin</artifactId>
                  <extensions>true</extensions>
                  <configuration>
                     <publishingServerId>central</publishingServerId>
                     <autoPublish>true</autoPublish>
                     <waitUntil>published</waitUntil>
                  </configuration>
               </plugin>
            </plugins>
         </build>
      </profile>
   </profiles>

   <!-- ********************************************** -->
   <!-- *********** ORGANIZATION AND MEMBERS ********* -->
   <!-- ********************************************** -->

   <organization>
      <name>Bernardo Martínez Garrido</name>
      <url>https://github.com/Bernardo-MG</url>
   </organization>

   <developers>
      <developer>
         <id>bmg</id>
         <name>Bernardo Martínez Garrido</name>
         <email>programming@bernardomg.com</email>
         <url>https://github.com/Bernardo-MG</url>
         <organization>Bernardo Martínez Garrido</organization>
         <organizationUrl>https://github.com/Bernardo-MG</organizationUrl>
         <roles>
            <role>Developer</role>
         </roles>
         <timezone>+1</timezone>
         <properties />
      </developer>
   </developers>

   <!-- ********************************************** -->
   <!-- **************** PROPERTIES ****************** -->
   <!-- ********************************************** -->

   <properties>
      <!-- ============================================== -->
      <!-- =============== MANIFEST DATA ================ -->
      <!-- ============================================== -->
      <manifest.name>com/bernardomg/spring-ws-starter</manifest.name>
      <!-- ============================================== -->
      <!-- =========== DEPENDENCIES VERSIONS ============ -->
      <!-- ============================================== -->
      <archunit.version>1.4.1</archunit.version>
      <bernardomg.framework.test.architecture>1.0.5</bernardomg.framework.test.architecture>
      <bernardomg.framework.validation.version>0.2.5</bernardomg.framework.validation.version>
      <jakarta.validation.version>3.1.1</jakarta.validation.version>
      <micrometer.version>1.14.8</micrometer.version>
      <slf4j.version>2.0.17</slf4j.version>
      <spring.boot.version>3.4.6</spring.boot.version>
      <spring.version>6.2.8</spring.version>
      <!-- ============================================== -->
      <!-- ============ PLUGIN CONFIGURATION ============ -->
      <!-- ============================================== -->
      <!-- Checkstyle customized rules file -->
      <checkstyle.config.location>${project.basedir}/src/config/checkstyle/checkstyle-rules.xml</checkstyle.config.location>
      <!-- ============================================== -->
      <!-- ================= MAVEN SITE ================= -->
      <!-- ============================================== -->
      <site.skin.version>2.4.1</site.skin.version>
      <mavenURL>http://mvnrepository.com/artifact/com.bernardomg.framework.spring/spring-ws-starter</mavenURL>
      <githubArtifactURL><![CDATA[https://github.com/Bernardo-MG?tab=packages&amp;repo_name=spring-ws-starter]]></githubArtifactURL>
   </properties>

   <!-- ********************************************** -->
   <!-- *************** DEPENDENCIES ***************** -->
   <!-- ********************************************** -->

   <dependencyManagement>
      <dependencies>
         <dependency>
            <!-- Spring Framework BOM -->
            <groupId>org.springframework</groupId>
            <artifactId>spring-framework-bom</artifactId>
            <version>${spring.version}</version>
            <type>pom</type>
            <scope>import</scope>
         </dependency>
         <dependency>
            <!-- Spring Boot Dependencies BOM -->
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-dependencies</artifactId>
            <version>${spring.boot.version}</version>
            <type>pom</type>
            <scope>import</scope>
         </dependency>
      </dependencies>
   </dependencyManagement>

   <dependencies>
      <!-- ============================================== -->
      <!-- ================ FRAMEWORK =================== -->
      <!-- ============================================== -->
      <dependency>
         <!-- Validation -->
         <groupId>com.bernardomg.framework</groupId>
         <artifactId>validation</artifactId>
         <version>${bernardomg.framework.validation.version}</version>
      </dependency>
      <!-- ============================================== -->
      <!-- ================== SPRING ==================== -->
      <!-- ============================================== -->
      <dependency>
         <!-- Spring Core -->
         <groupId>org.springframework</groupId>
         <artifactId>spring-core</artifactId>
      </dependency>
      <dependency>
         <!-- Spring beans -->
         <groupId>org.springframework</groupId>
         <artifactId>spring-beans</artifactId>
      </dependency>
      <dependency>
         <!-- Spring context -->
         <groupId>org.springframework</groupId>
         <artifactId>spring-context</artifactId>
      </dependency>
      <dependency>
         <!-- Spring Web -->
         <groupId>org.springframework</groupId>
         <artifactId>spring-web</artifactId>
      </dependency>
      <dependency>
         <!-- Spring Web MVC -->
         <groupId>org.springframework</groupId>
         <artifactId>spring-webmvc</artifactId>
      </dependency>
      <dependency>
         <!-- Spring transactions -->
         <groupId>org.springframework</groupId>
         <artifactId>spring-tx</artifactId>
         <scope>provided</scope>
      </dependency>
      <!-- ============================================== -->
      <!-- =============== SPRING DATA ================== -->
      <!-- ============================================== -->
      <dependency>
         <!-- Spring data commons -->
         <groupId>org.springframework.data</groupId>
         <artifactId>spring-data-commons</artifactId>
      </dependency>
      <!-- ============================================== -->
      <!-- =============== SPRING BOOT ================== -->
      <!-- ============================================== -->
      <dependency>
         <!-- Spring Boot -->
         <groupId>org.springframework.boot</groupId>
         <artifactId>spring-boot</artifactId>
      </dependency>
      <dependency>
         <!-- Spring Boot: Autoconfigure -->
         <groupId>org.springframework.boot</groupId>
         <artifactId>spring-boot-autoconfigure</artifactId>
      </dependency>
      <!-- ============================================== -->
      <!-- ================ VALIDATION ================== -->
      <!-- ============================================== -->
      <dependency>
         <!-- Jakarta validation -->
         <groupId>jakarta.validation</groupId>
         <artifactId>jakarta.validation-api</artifactId>
         <version>${jakarta.validation.version}</version>
      </dependency>
      <!-- ============================================== -->
      <!-- ================== LOGGING =================== -->
      <!-- ============================================== -->
      <dependency>
         <!-- SL4J API -->
         <groupId>org.slf4j</groupId>
         <artifactId>slf4j-api</artifactId>
         <version>${slf4j.version}</version>
      </dependency>
      <dependency>
         <!-- Log4j SLF4J Bridge -->
         <groupId>org.apache.logging.log4j</groupId>
         <artifactId>log4j-slf4j2-impl</artifactId>
         <scope>provided</scope>
      </dependency>
      <dependency>
         <!-- Log4j core -->
         <groupId>org.apache.logging.log4j</groupId>
         <artifactId>log4j-core</artifactId>
         <scope>provided</scope>
      </dependency>
      <dependency>
         <!-- Log4j Commons Logging Bridge -->
         <groupId>org.apache.logging.log4j</groupId>
         <artifactId>log4j-jcl</artifactId>
         <scope>provided</scope>
         <exclusions>
            <exclusion>
               <groupId>commons-logging</groupId>
               <artifactId>commons-logging</artifactId>
            </exclusion>
         </exclusions>
      </dependency>
      <dependency>
         <!-- Log4j Web -->
         <groupId>org.apache.logging.log4j</groupId>
         <artifactId>log4j-web</artifactId>
         <scope>provided</scope>
      </dependency>
      <!-- ============================================== -->
      <!-- ============ VERSION CONVERGENCE ============= -->
      <!-- ============================================== -->
      <dependency>
         <groupId>io.micrometer</groupId>
         <artifactId>micrometer-observation</artifactId>
         <version>${micrometer.version}</version>
      </dependency>
      <dependency>
         <groupId>io.micrometer</groupId>
         <artifactId>micrometer-commons</artifactId>
         <version>${micrometer.version}</version>
      </dependency>
      <!-- ============================================== -->
      <!-- ======= TEST ENVIRONMENT DEPENDENCIES ======== -->
      <!-- ============================================== -->
      <dependency>
         <!-- Hamcrest -->
         <groupId>org.hamcrest</groupId>
         <artifactId>hamcrest-core</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <!-- JSON Path -->
         <groupId>com.jayway.jsonpath</groupId>
         <artifactId>json-path</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <!-- JUnit Jupiter Engine -->
         <groupId>org.junit.jupiter</groupId>
         <artifactId>junit-jupiter-engine</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <!-- Mockito -->
         <groupId>org.mockito</groupId>
         <artifactId>mockito-core</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <!-- Spring Test -->
         <groupId>org.springframework</groupId>
         <artifactId>spring-test</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <!-- Spring Boot Test -->
         <groupId>org.springframework.boot</groupId>
         <artifactId>spring-boot-test</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <!-- Spring Boot Starter: Test Autoconfigure -->
         <groupId>org.springframework.boot</groupId>
         <artifactId>spring-boot-test-autoconfigure</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <!-- Spring Boot Starter: Test -->
         <groupId>org.springframework.boot</groupId>
         <artifactId>spring-boot-starter-test</artifactId>
         <scope>test</scope>
         <exclusions>
            <exclusion>
               <groupId>org.junit.vintage</groupId>
               <artifactId>junit-vintage-engine</artifactId>
            </exclusion>
            <exclusion>
               <groupId>ch.qos.logback</groupId>
               <artifactId>logback-classic</artifactId>
            </exclusion>
            <exclusion>
               <groupId>org.apache.logging.log4j</groupId>
               <artifactId>log4j-to-slf4j</artifactId>
            </exclusion>
         </exclusions>
      </dependency>
      <dependency>
         <!-- Spring Boot Starter: Web -->
         <groupId>org.springframework.boot</groupId>
         <artifactId>spring-boot-starter-web</artifactId>
         <scope>test</scope>
         <exclusions>
            <exclusion>
               <groupId>ch.qos.logback</groupId>
               <artifactId>logback-classic</artifactId>
            </exclusion>
            <exclusion>
               <groupId>org.apache.logging.log4j</groupId>
               <artifactId>log4j-to-slf4j</artifactId>
            </exclusion>
         </exclusions>
      </dependency>
      <dependency>
         <!-- Spring Boot Starter: Validation -->
         <groupId>org.springframework.boot</groupId>
         <artifactId>spring-boot-starter-validation</artifactId>
         <scope>test</scope>
         <exclusions>
            <exclusion>
               <groupId>ch.qos.logback</groupId>
               <artifactId>logback-classic</artifactId>
            </exclusion>
            <exclusion>
               <groupId>org.apache.logging.log4j</groupId>
               <artifactId>log4j-to-slf4j</artifactId>
            </exclusion>
         </exclusions>
      </dependency>
      <dependency>
         <!-- GSON -->
         <groupId>com.google.code.gson</groupId>
         <artifactId>gson</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>jakarta.servlet</groupId>
         <artifactId>jakarta.servlet-api</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <!-- ArchUnit -->
         <groupId>com.tngtech.archunit</groupId>
         <artifactId>archunit-junit5</artifactId>
         <version>${archunit.version}</version>
         <scope>test</scope>
      </dependency>
      <dependency>
         <!-- Architecture Tests -->
         <groupId>com.bernardomg.framework.testing</groupId>
         <artifactId>architecture-tests</artifactId>
         <version>${bernardomg.framework.test.architecture}</version>
         <scope>test</scope>
      </dependency>
   </dependencies>

   <!-- ********************************************** -->
   <!-- ******************* BUILD ******************** -->
   <!-- ********************************************** -->

   <build>
      <defaultGoal>clean package</defaultGoal>
      <plugins>
         <plugin>
            <!-- Changes -->
            <!-- Takes care of the changes log -->
            <!-- It is set to also validate the changes log file -->
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-changes-plugin</artifactId>
            <executions>
               <!-- Changes plugin is bound to the pre-site phase -->
               <execution>
                  <id>check-changes</id>
                  <phase>pre-site</phase>
                  <goals>
                     <goal>changes-check</goal>
                  </goals>
               </execution>
               <execution>
                  <id>validate-changes</id>
                  <phase>pre-site</phase>
                  <goals>
                     <goal>changes-validate</goal>
                  </goals>
                  <configuration>
                     <failOnError>true</failOnError>
                  </configuration>
               </execution>
            </executions>
         </plugin>
         <plugin>
            <!-- Site -->
            <!-- Generates the Maven Site -->
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-site-plugin</artifactId>
            <dependencies>
               <dependency>
                  <!-- Docs Maven Skin -->
                  <groupId>com.bernardomg.maven.skins</groupId>
                  <artifactId>docs-maven-skin</artifactId>
                  <version>${site.skin.version}</version>
               </dependency>
            </dependencies>
         </plugin>
         <plugin>
            <!-- Build helper -->
            <!-- Adds the generated files to the Maven classpath -->
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>build-helper-maven-plugin</artifactId>
            <executions>
               <execution>
                  <id>add-source</id>
                  <goals>
                     <goal>add-source</goal>
                  </goals>
                  <configuration>
                     <sources>
                        <!-- JPA meta-model -->
                        <source>${project.build.directory}/generated-sources/apt</source>
                     </sources>
                  </configuration>
               </execution>
            </executions>
         </plugin>
      </plugins>
   </build>

   <!-- ********************************************** -->
   <!-- ****************** REPORTS ******************* -->
   <!-- ********************************************** -->

   <reporting>
      <plugins>
         <plugin>
            <!-- PMD -->
            <!-- Checks that the code complies with a series of code quality
            rules -->
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-pmd-plugin</artifactId>
            <configuration>
               <rulesets>
                  <!-- The customized rules file -->
                  <ruleset>${project.basedir}/src/config/pmd/pmd-rules.xml</ruleset>
               </rulesets>
            </configuration>
         </plugin>
      </plugins>
   </reporting>

</project>