<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.sap.cds</groupId>
  <artifactId>cds-feature-attachments-root</artifactId>
  <version>1.0.5</version>
  <packaging>pom</packaging>
  <name>CDS Feature for Attachments - Root</name>
  <description>This artifact is a CAP Java plugin that provides out-of-the box attachments storage and handling by using an aspect Attachments.</description>
  <url>https://cap.cloud.sap/docs/plugins/#attachments</url>
  <organization>
    <name>SAP SE</name>
    <url>https://www.sap.com</url>
  </organization>
  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <developers>
    <developer>
      <organization>SAP SE</organization>
      <organizationUrl>https://www.sap.com</organizationUrl>
    </developer>
  </developers>
  <modules>
    <module>cds-feature-attachments</module>
    <module>integration-tests</module>
  </modules>
  <scm>
    <connection>scm:git:git@github.com:cap-java/cds-feature-attachments.git</connection>
    <developerConnection>scm:git:git@github.com:cap-java/cds-feature-attachments.git</developerConnection>
    <url>https://github.com/cap-java/cds-feature-attachments</url>
  </scm>
  <distributionManagement>
    <repository>
      <id>ossrh</id>
      <name>MavenCentral</name>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
    <snapshotRepository>
      <id>artifactory</id>
      <name>Artifactory_DMZ-snapshots</name>
      <url>https://common.repositories.cloud.sap/artifactory/cap-java</url>
    </snapshotRepository>
  </distributionManagement>
  <properties>
    <maven.compiler.release>${java.version}</maven.compiler.release>
    <java.version>17</java.version>
    <cds.services.version>2.9.1</cds.services.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <excluded.generation.package>com/sap/cds/feature/attachments/generated/</excluded.generation.package>
    <generation-folder>src/gen</generation-folder>
    <revision>1.0.5</revision>
    <cds.install-cdsdk.version>7.7.0</cds.install-cdsdk.version>
  </properties>
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>com.sap.cds</groupId>
        <artifactId>cds-services-bom</artifactId>
        <version>${cds.services.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-bom</artifactId>
        <version>5.14.2</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>com.sap.cds</groupId>
        <artifactId>cds-feature-attachments</artifactId>
        <version>1.0.5</version>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>com.sap.cds</groupId>
      <artifactId>cds-services-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter</artifactId>
      <version>5.11.3</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
      <version>3.26.3</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-clean-plugin</artifactId>
          <version>3.4.0</version>
        </plugin>
        <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.13.0</version>
        </plugin>
        <plugin>
          <artifactId>maven-source-plugin</artifactId>
          <version>3.3.1</version>
        </plugin>
        <plugin>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>3.1.3</version>
        </plugin>
        <plugin>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>3.11.1</version>
        </plugin>
        <plugin>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>3.5.2</version>
        </plugin>
        <plugin>
          <artifactId>maven-pmd-plugin</artifactId>
          <version>3.26.0</version>
        </plugin>
        <plugin>
          <artifactId>maven-enforcer-plugin</artifactId>
          <version>3.5.0</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>flatten-maven-plugin</artifactId>
          <version>1.6.0</version>
        </plugin>
        <plugin>
          <groupId>org.jacoco</groupId>
          <artifactId>jacoco-maven-plugin</artifactId>
          <version>0.8.12</version>
        </plugin>
        <plugin>
          <groupId>org.pitest</groupId>
          <artifactId>pitest-maven</artifactId>
          <version>1.17.1</version>
        </plugin>
        <plugin>
          <groupId>com.github.spotbugs</groupId>
          <artifactId>spotbugs-maven-plugin</artifactId>
          <version>4.8.6.5</version>
        </plugin>
        <plugin>
          <groupId>com.sap.cds</groupId>
          <artifactId>cds-maven-plugin</artifactId>
          <version>${cds.services.version}</version>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>flatten-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>flatten</id>
            <phase>process-resources</phase>
            <goals>
              <goal>flatten</goal>
            </goals>
          </execution>
          <execution>
            <id>flatten.clean</id>
            <phase>clean</phase>
            <goals>
              <goal>clean</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <updatePomFile>true</updatePomFile>
          <flattenMode>resolveCiFriendliesOnly</flattenMode>
        </configuration>
      </plugin>
      <plugin>
        <groupId>com.github.spotbugs</groupId>
        <artifactId>spotbugs-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>spotbugs-error</id>
            <phase>process-test-classes</phase>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <effort>Max</effort>
          <xmlOutput>true</xmlOutput>
          <excludeFilterFile>/src/main/resources/spotbugs-exclusion-filter.xml</excludeFilterFile>
          <spotbugsXmlOutputDirectory>${project.build.directory}</spotbugsXmlOutputDirectory>
          <includeTests>true</includeTests>
          <skip>${skipDuringDeploy}</skip>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-pmd-plugin</artifactId>
        <executions>
          <execution>
            <id>pmd-error</id>
            <phase>process-test-classes</phase>
            <goals>
              <goal>check</goal>
              <goal>cpd-check</goal>
            </goals>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>com.sap.cloud.sdk.quality</groupId>
            <artifactId>pmd-rules</artifactId>
            <version>3.78.0</version>
          </dependency>
        </dependencies>
        <configuration>
          <targetJdk>${java.version}</targetJdk>
          <failurePriority>5</failurePriority>
          <targetDirectory>${project.build.directory}</targetDirectory>
          <printFailingErrors>true</printFailingErrors>
          <includeTests>true</includeTests>
          <linkXRef>false</linkXRef>
          <verbose>false</verbose>
          <rulesets>
            <ruleset>/rulesets/java/maven-pmd-plugin-default.xml</ruleset>
          </rulesets>
          <excludes>
            <exclude>**/${excluded.generation.package}**</exclude>
            <exclude>**/*Test**</exclude>
          </excludes>
          <skip>${skipDuringDeploy}</skip>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-enforcer-plugin</artifactId>
        <executions>
          <execution>
            <id>no-duplicate-declared-dependencies</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <banDuplicatePomDependencyVersions />
                <requireMavenVersion>
                  <version>3.6.3</version>
                </requireMavenVersion>
                <requireJavaVersion>
                  <version>${java.version}</version>
                </requireJavaVersion>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
