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

    <name>SAP Cloud SDK - Parent POM</name>
    <description>Parent POM of the SAP Cloud SDK.</description>

    <groupId>com.sap.cloud.s4hana</groupId>
    <artifactId>sdk-parent</artifactId>
    <version>2.22.0</version>
    <packaging>pom</packaging>

    <url>https://www.sap.com/s4sdk</url>

    <organization>
        <name>SAP SE</name>
        <url>https://www.sap.com</url>
    </organization>

    <licenses>
        <license>
            <name>SAP DEVELOPER LICENSE AGREEMENT</name>
            <url>https://tools.hana.ondemand.com/developer-license-3_1.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>SAP</name>
            <email>s4sdk@sap.com</email>
            <organization>SAP SE</organization>
            <organizationUrl>https://www.sap.com</organizationUrl>
        </developer>
    </developers>

    <scm>
        <connection />
        <url />
    </scm>

    <properties>
        <!-- do not modify the following line, it is updated by the versioning script -->
        <s4sdk.version>2.22.0</s4sdk.version>

        <maven.version>3.5</maven.version>

        <java.version>1.8</java.version>
        <java.failOnWarning>true</java.failOnWarning>
        <java.compilerArgument />

        <javadoc.opts />

        <project.rootdir>${project.basedir}</project.rootdir>

        <project.build.resourceEncoding>UTF-8</project.build.resourceEncoding>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

        <project.build.generated-sources>${project.build.directory}/generated-sources/java</project.build.generated-sources>
        <project.build.javaCodeFormatter>${project.rootdir}/codestyle/java_formatter.xml</project.build.javaCodeFormatter>

        <!-- Quality assurance -->

        <enforcer.skipBanLoggingFrameworks>false</enforcer.skipBanLoggingFrameworks>
        <enforcer.skipEnforceScopeLoggerBridges>false</enforcer.skipEnforceScopeLoggerBridges>
        <enforcer.skipEnforceScopeJavaEE>false</enforcer.skipEnforceScopeJavaEE>
        <enforcer.skipEnforceScopeLombok>false</enforcer.skipEnforceScopeLombok>
        <enforcer.skipBanHighLicenseRisk>false</enforcer.skipBanHighLicenseRisk>

        <surefire.skipTests>false</surefire.skipTests>
        <surefire.forkCount>1C</surefire.forkCount>
        <surefire.include>*</surefire.include>
        <surefire.exclude />
        <surefire.groups />
        <surefire.excludedGroups />
        <surefire.maxMemorySize>1024m</surefire.maxMemorySize>
        <surefire.logLevel>warn</surefire.logLevel>

        <!--
        Use the argLine property to define the arguments for the JVMs that are forked by the surefire plugin.
        This avoids the need to use late property evaluation for configuring the jacoco plugin.
        Relying on late evaluation of properties such as @{argLine} can result in issues with certain IDEs.

        For more details, visit:
        https://www.eclemma.org/jacoco/trunk/doc/prepare-agent-mojo.html
        -->
        <argLine>-Xmx${surefire.maxMemorySize} -Dorg.slf4j.simpleLogger.defaultLogLevel=${surefire.logLevel}</argLine>

        <jacoco.executionDataFile>${project.build.directory}/coverage-reports/jacoco.exec</jacoco.executionDataFile>
        <jacoco.includes>*</jacoco.includes>
        <jacoco.excludes>org.apache.*</jacoco.excludes>

        <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
        <sonar.jacoco.reportPath>${jacoco.executionDataFile}</sonar.jacoco.reportPath>
        <sonar.language>java</sonar.language>
        <sonar.javascript.jslint.reportPath>${project.build.directory}/jslint.xml</sonar.javascript.jslint.reportPath>

        <codeAnalysisExclusions />

        <proxy.host>proxy.wdf.sap.corp</proxy.host>
        <proxy.port>8080</proxy.port>

        <test.systems>${project.rootdir}/systems</test.systems>
        <test.credentials>${project.rootdir}/credentials</test.credentials>

        <japicmp.skip>false</japicmp.skip>

        <!-- SDK-internal dependencies -->

        <bouncycastle.version>1.60</bouncycastle.version>
        <codemodel.version>2.6</codemodel.version>
        <javapoet.version>1.11.1</javapoet.version>
        <commons-cli.version>1.4</commons-cli.version>
        <joda-time.version>2.10</joda-time.version>
        <jsoup.version>1.11.3</jsoup.version>
        <jooq.version>3.6.2</jooq.version>
        <joor.version>0.9.9</joor.version>
        <pmd.version>6.16.0</pmd.version>
        <hamcrest.version>1.3</hamcrest.version>
        <jdom2.version>2.0.6</jdom2.version>
        <mojo-executor.version>2.3.0</mojo-executor.version>
        <maven-plugin.version>3.5.2</maven-plugin.version>
        <maven-plugin-testing.version>3.3.0</maven-plugin-testing.version>
        <plexus-utils.version>3.1.0</plexus-utils.version>
        <plexus-component-annotations.version>1.7.1</plexus-component-annotations.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.sap.cloud.s4hana</groupId>
                <artifactId>sdk-bom</artifactId>
                <version>${s4sdk.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

            <!-- SDK-internal dependencies -->

            <dependency>
                <groupId>org.bouncycastle</groupId>
                <artifactId>bcprov-jdk15on</artifactId>
                <version>${bouncycastle.version}</version>
            </dependency>
            <dependency>
                <groupId>org.bouncycastle</groupId>
                <artifactId>bcpkix-jdk15on</artifactId>
                <version>${bouncycastle.version}</version>
            </dependency>

            <dependency>
                <groupId>com.sun.codemodel</groupId>
                <artifactId>codemodel</artifactId>
                <version>${codemodel.version}</version>
            </dependency>

            <dependency>
                <groupId>com.squareup</groupId>
                <artifactId>javapoet</artifactId>
                <version>${javapoet.version}</version>
            </dependency>

            <dependency>
                <groupId>commons-cli</groupId>
                <artifactId>commons-cli</artifactId>
                <version>${commons-cli.version}</version>
            </dependency>

            <dependency>
                <groupId>joda-time</groupId>
                <artifactId>joda-time</artifactId>
                <version>${joda-time.version}</version>
            </dependency>

            <dependency>
                <groupId>org.jsoup</groupId>
                <artifactId>jsoup</artifactId>
                <version>${jsoup.version}</version>
            </dependency>

            <dependency>
                <groupId>org.jooq</groupId>
                <artifactId>jooq</artifactId>
                <version>${jooq.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jooq</groupId>
                <artifactId>joor-java-8</artifactId>
                <version>${joor.version}</version>
            </dependency>

            <dependency>
                <groupId>net.sourceforge.pmd</groupId>
                <artifactId>pmd-core</artifactId>
                <version>${pmd.version}</version>
            </dependency>
            <dependency>
                <groupId>net.sourceforge.pmd</groupId>
                <artifactId>pmd-java</artifactId>
                <version>${pmd.version}</version>
            </dependency>
            <dependency>
                <groupId>net.sourceforge.pmd</groupId>
                <artifactId>pmd-test</artifactId>
                <version>${pmd.version}</version>
            </dependency>

            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest-core</artifactId>
                <version>${hamcrest.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest-library</artifactId>
                <version>${hamcrest.version}</version>
            </dependency>

            <dependency>
                <groupId>org.jdom</groupId>
                <artifactId>jdom2</artifactId>
                <version>${jdom2.version}</version>
            </dependency>

            <dependency>
                <groupId>org.twdata.maven</groupId>
                <artifactId>mojo-executor</artifactId>
                <version>${mojo-executor.version}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.maven</groupId>
                <artifactId>maven-core</artifactId>
                <version>${maven-plugin.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.maven</groupId>
                <artifactId>maven-model</artifactId>
                <version>${maven-plugin.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.maven</groupId>
                <artifactId>maven-artifact</artifactId>
                <version>${maven-plugin.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.maven</groupId>
                <artifactId>maven-plugin-api</artifactId>
                <version>${maven-plugin.version}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.maven</groupId>
                <artifactId>maven-compat</artifactId>
                <version>${maven-plugin.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.maven.plugin-testing</groupId>
                <artifactId>maven-plugin-testing-harness</artifactId>
                <version>${maven-plugin-testing.version}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.maven.plugin-tools</groupId>
                <artifactId>maven-plugin-annotations</artifactId>
                <version>${maven-plugin.version}</version>
            </dependency>

            <!-- required for convergence of maven plugin dependencies -->
            <dependency>
                <groupId>org.codehaus.plexus</groupId>
                <artifactId>plexus-utils</artifactId>
                <version>${plexus-utils.version}</version>
            </dependency>
            <dependency>
                <groupId>org.codehaus.plexus</groupId>
                <artifactId>plexus-component-annotations</artifactId>
                <version>${plexus-component-annotations.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <!-- add logger for tests -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <resources>
            <resource>
                <directory>${project.basedir}/src/main/resources</directory>
            </resource>

            <!-- include README in all jar files -->
            <resource>
                <directory>${project.rootdir}</directory>
                <includes>
                    <include>README</include>
                </includes>
                <filtering>false</filtering>
            </resource>
        </resources>

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>3.0.0-M2</version>
                    <configuration>
                        <fail>true</fail>
                    </configuration>
                    <executions>
                        <execution>
                            <id>enforce-project-rules</id>
                            <goals>
                                <goal>enforce</goal>
                            </goals>
                            <configuration>
                                <rules>
                                    <requireMavenVersion>
                                        <version>${maven.version}</version>
                                    </requireMavenVersion>

                                    <requireJavaVersion>
                                        <version>${java.version}</version>
                                    </requireJavaVersion>

                                    <banDistributionManagement />
                                    <banDuplicatePomDependencyVersions />
                                    <dependencyConvergence />
                                </rules>
                            </configuration>
                        </execution>
                        <execution>
                            <id>ban-deprecated-dependencies</id>
                            <goals>
                                <goal>enforce</goal>
                            </goals>
                            <configuration>
                                <rules>
                                    <bannedDependencies>
                                        <message>Do not use deprecated dependencies.</message>
                                        <excludes>
                                            <exclude>javax.servlet:servlet-api</exclude> <!-- use javax.servlet:javax.servlet-api -->
                                            <exclude>javax.ws.rs:jsr311-api</exclude> <!-- use javax.ws.rs:javax.ws.rs-api -->
                                            <exclude>commons-httpclient:commons-httpclient</exclude>
                                        </excludes>
                                    </bannedDependencies>
                                </rules>
                            </configuration>
                        </execution>
                        <execution>
                            <id>ban-logging-frameworks</id>
                            <goals>
                                <goal>enforce</goal>
                            </goals>
                            <configuration>
                                <skip>${enforcer.skipBanLoggingFrameworks}</skip>
                                <rules>
                                    <bannedDependencies>
                                        <message>Do not use and exclude all transitive uses of logging frameworks.</message>
                                        <excludes>
                                            <exclude>org.slf4j:slf4j-simple</exclude>
                                            <exclude>commons-logging</exclude>
                                            <exclude>ch.qos.logback</exclude>
                                            <exclude>org.apache.logging.log4j</exclude>
                                            <exclude>org.apache.log4j</exclude>
                                            <exclude>log4j</exclude>
                                            <exclude>org.tinylog</exclude>
                                        </excludes>
                                        <includes>
                                            <include>org.slf4j:slf4j-simple:*:*:test</include>
                                        </includes>
                                    </bannedDependencies>
                                </rules>
                            </configuration>
                        </execution>
                        <execution>
                            <id>enforce-scope-logger-bridges</id>
                            <goals>
                                <goal>enforce</goal>
                            </goals>
                            <configuration>
                                <skip>${enforcer.skipEnforceScopeLoggerBridges}</skip>
                                <rules>
                                    <bannedDependencies>
                                        <message>Logger bridges must use scope runtime or test.</message>
                                        <excludes>
                                            <exclude>org.slf4j:jul-to-slf4j</exclude>
                                            <exclude>org.slf4j:jcl-over-slf4j</exclude>
                                            <exclude>org.slf4j:log4j-over-slf4j</exclude>
                                        </excludes>
                                        <includes>
                                            <include>org.slf4j:jul-to-slf4j:*:*:runtime</include>
                                            <include>org.slf4j:jul-to-slf4j:*:*:test</include>
                                            <include>org.slf4j:jcl-over-slf4j:*:*:runtime</include>
                                            <include>org.slf4j:jcl-over-slf4j:*:*:test</include>
                                            <include>org.slf4j:log4j-over-slf4j:*:*:runtime</include>
                                            <include>org.slf4j:log4j-over-slf4j:*:*:test</include>
                                        </includes>
                                    </bannedDependencies>
                                </rules>
                            </configuration>
                        </execution>
                        <execution>
                            <id>enforce-scope-javaee</id>
                            <goals>
                                <goal>enforce</goal>
                            </goals>
                            <configuration>
                                <skip>${enforcer.skipEnforceScopeJavaEE}</skip>
                                <rules>
                                    <bannedDependencies>
                                        <message>Use Java EE modules with scope provided or test.</message>
                                        <excludes>
                                            <exclude>javax:javaee-api</exclude>
                                            <exclude>javax:javaee-web-api</exclude>
                                            <exclude>javax:javax.ejb-api</exclude>
                                            <exclude>javax.inject:javax.inject</exclude>
                                            <exclude>javax.validation:validation-api</exclude>
                                            <exclude>javax.servlet:javax.servlet-api</exclude>
                                            <exclude>javax.ws.rs:javax.ws.rs-api</exclude>
                                        </excludes>
                                        <includes>
                                            <include>javax:javaee-api:*:*:provided</include>
                                            <include>javax:javaee-api:*:*:test</include>
                                            <include>javax:javaee-web-api:*:*:provided</include>
                                            <include>javax:javaee-web-api:*:*:test</include>
                                            <include>javax:javax.ejb-api:*:*:provided</include>
                                            <include>javax:javax.ejb-api:*:*:test</include>
                                            <include>javax.inject:javax.inject:*:*:provided</include>
                                            <include>javax.inject:javax.inject:*:*:test</include>
                                            <include>javax.validation:validation-api:*:*:provided</include>
                                            <include>javax.validation:validation-api:*:*:test</include>
                                            <include>javax.servlet:javax.servlet-api:*:*:provided</include>
                                            <include>javax.servlet:javax.servlet-api:*:*:test</include>
                                            <include>javax.ws.rs:javax.ws.rs-api:*:*:provided</include>
                                            <include>javax.ws.rs:javax.ws.rs-api:*:*:test</include>
                                        </includes>
                                    </bannedDependencies>
                                </rules>
                            </configuration>
                        </execution>

                        <execution>
                            <id>enforce-scope-lombok</id>
                            <goals>
                                <goal>enforce</goal>
                            </goals>
                            <configuration>
                                <skip>${enforcer.skipEnforceScopeLombok}</skip>
                                <rules>
                                    <bannedDependencies>
                                        <message>Use lombok with scope provided.</message>
                                        <excludes>
                                            <exclude>org.projectlombok:lombok</exclude>
                                        </excludes>
                                        <includes>
                                            <include>org.projectlombok:lombok:*:*:provided</include>
                                        </includes>
                                    </bannedDependencies>
                                </rules>
                            </configuration>
                        </execution>
                        <execution>
                            <id>ban-high-license-risk-dependencies</id>
                            <goals>
                                <goal>enforce</goal>
                            </goals>
                            <configuration>
                                <skip>${enforcer.skipBanHighLicenseRisk}</skip>
                                <rules>
                                    <bannedDependencies>
                                        <message>Do not include any high license risk dependencies without team coordination.</message>
                                        <excludes>
                                            <exclude>org.hibernate:hibernate-core</exclude>
                                        </excludes>
                                    </bannedDependencies>
                                </rules>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>net.revelc.code.formatter</groupId>
                    <artifactId>formatter-maven-plugin</artifactId>
                    <version>2.7.5</version>
                    <configuration>
                        <configFile>${project.build.javaCodeFormatter}</configFile>
                        <encoding>${project.build.sourceEncoding}</encoding>
                        <directories>
                            <directory>${project.basedir}/src/main/java</directory>
                            <directory>${project.basedir}/src/test/java</directory>
                        </directories>
                    </configuration>
                    <executions>
                        <execution>
                            <phase>process-sources</phase>
                            <goals>
                                <goal>format</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>net.revelc.code</groupId>
                    <artifactId>impsort-maven-plugin</artifactId>
                    <version>1.2.0</version>
                    <configuration>
                        <groups>java.,javax.,org.,com.</groups>
                        <staticGroups>java,*</staticGroups>
                        <staticAfter>false</staticAfter>
                        <removeUnused>true</removeUnused>
                        <excludes>
                            <exclude>**/test/resources/**</exclude>
                        </excludes>
                    </configuration>
                    <executions>
                        <execution>
                            <id>sort-imports</id>
                            <goals>
                                <goal>sort</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>3.1.1</version>
                    <configuration>
                        <failOnWarning>true</failOnWarning>
                        <failBuild>true</failBuild>
                        <ignoreNonCompile>true</ignoreNonCompile>
                        <ignoredUnusedDeclaredDependencies combine.children="append">
                            <!-- ignore annotations that are not visible on bytecode level -->
                            <ignoredUnusedDeclaredDependency>com.google.code.findbugs:jsr305</ignoredUnusedDeclaredDependency>
                            <ignoredUnusedDeclaredDependency>org.projectlombok:lombok</ignoredUnusedDeclaredDependency>
                        </ignoredUnusedDeclaredDependencies>
                    </configuration>
                    <executions>
                        <execution>
                            <id>analyze</id>
                            <goals>
                                <goal>analyze-only</goal>
                            </goals>
                            <phase>process-test-classes</phase>
                        </execution>
                        <execution>
                            <id>analyze-dep-mgt</id>
                            <goals>
                                <goal>analyze-dep-mgt</goal>
                            </goals>
                            <phase>process-test-classes</phase>
                        </execution>
                        <execution>
                            <id>analyze-duplicate</id>
                            <goals>
                                <goal>analyze-duplicate</goal>
                            </goals>
                            <phase>process-test-classes</phase>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-clean-plugin</artifactId>
                    <version>3.1.0</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.8.0</version>
                    <configuration>
                        <compilerVersion>${java.version}</compilerVersion>
                        <source>${java.version}</source>
                        <target>${java.version}</target>
                        <testSource>${java.version}</testSource>
                        <testTarget>${java.version}</testTarget>
                        <showWarnings>true</showWarnings>
                        <showDeprecation>true</showDeprecation>
                        <failOnWarning>${java.failOnWarning}</failOnWarning>
                        <compilerArgument>${java.compilerArgument}</compilerArgument>
                        <compilerArgs combine.children="append">
                            <arg>-bootclasspath</arg>
                            <arg>${java.home}/lib/rt.jar</arg>
                            <arg>-Xlint:all</arg>
                            <arg>-Xlint:-processing</arg>
                        </compilerArgs>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>3.1.0</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>3.1.0</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>2.5.2</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>2.8.2</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>3.7.1</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-archetype-plugin</artifactId>
                    <version>3.0.1</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-plugin-plugin</artifactId>
                    <version>3.5.2</version>
                </plugin>

                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>build-helper-maven-plugin</artifactId>
                    <version>3.0.0</version>
                    <executions>
                        <execution>
                            <id>remove-old-artifacts</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>remove-project-artifact</goal>
                            </goals>
                            <configuration>
                                <removeAll>false</removeAll>
                                <failOnError>false</failOnError>
                            </configuration>
                        </execution>
                        <execution>
                            <id>add-source</id>
                            <phase>generate-sources</phase>
                            <goals>
                                <goal>add-source</goal>
                            </goals>
                            <configuration>
                                <sources>
                                    <source>${project.build.generated-sources}</source>
                                </sources>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>0.8.2</version>
                    <configuration>
                        <destFile>${jacoco.executionDataFile}</destFile>
                        <dataFile>${jacoco.executionDataFile}</dataFile>
                        <includes>${jacoco.includes}</includes>
                        <excludes>${jacoco.excludes}</excludes>
                    </configuration>
                    <executions>
                        <execution>
                            <id>prepare-agent</id>
                            <goals>
                                <goal>prepare-agent</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>3.0.0-M3</version>
                    <configuration>
                        <skipTests>${surefire.skipTests}</skipTests>
                        <includes>
                            <include>${surefire.include}</include>
                        </includes>
                        <excludes>
                            <exclude>${surefire.exclude}</exclude>
                        </excludes>
                        <forkCount>${surefire.forkCount}</forkCount>
                        <reuseForks>false</reuseForks>
                        <groups>${surefire.groups}</groups>
                        <excludedGroups>${surefire.excludedGroups}</excludedGroups>
                        <systemPropertyVariables>
                            <surefire.forkDir>${project.build.directory}/surefire-fork/${surefire.forkNumber}/</surefire.forkDir>
                            <test.systems>${test.systems}</test.systems>
                            <test.credentials>${test.credentials}</test.credentials>
                        </systemPropertyVariables>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <version>3.0.0</version>
                    <configuration>
                        <configLocation>${project.rootdir}/codestyle/SAPDefaultProfile-1.4.6-checkstyle.xml</configLocation>
                        <linkXRef>false</linkXRef>
                        <includeResources>false</includeResources>
                        <includeTestResources>false</includeTestResources>
                        <excludes>${codeAnalysisExclusions}</excludes>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>com.github.spotbugs</groupId>
                    <artifactId>spotbugs-maven-plugin</artifactId>
                    <version>3.1.5</version>
                    <configuration>
                        <includeFilterFile>${project.rootdir}/codestyle/SAPDefaultProfile-1.4.6-findbugs.xml</includeFilterFile>
                        <effort>More</effort>
                        <maxHeap>2048</maxHeap>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-pmd-plugin</artifactId>
                    <version>3.10.0</version>
                    <configuration>
                        <rulesets>
                            <ruleset>${project.rootdir}/codestyle/SAPDefaultProfile-1.4.6-pmd.xml</ruleset>
                            <ruleset>${project.rootdir}/codestyle/pmd_rules.xml</ruleset>
                        </rulesets>
                        <linkXRef>false</linkXRef>
                        <targetJdk>${java.version}</targetJdk>
                        <excludes>
                            <exclude>${codeAnalysisExclusions}</exclude>
                        </excludes>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.owasp</groupId>
                    <artifactId>dependency-check-maven</artifactId>
                    <version>3.1.0</version>
                    <configuration>
                        <failBuildOnCVSS>7</failBuildOnCVSS>
                        <skipProvidedScope>true</skipProvidedScope>
                        <skipRuntimeScope>true</skipRuntimeScope>
                        <skipTestScope>true</skipTestScope>
                        <jarAnalyzerEnabled>false</jarAnalyzerEnabled>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.whitesource</groupId>
                    <artifactId>whitesource-maven-plugin</artifactId>
                    <version>18.10.2.1</version>
                    <configuration>
                        <checkPolicies>true</checkPolicies>
                        <failOnError>true</failOnError>
                        <ignorePomModules>false</ignorePomModules>
                        <autoDetectProxySettings>true</autoDetectProxySettings>
                        <forceCheckAllDependencies>true</forceCheckAllDependencies>
                        <forceUpdate>true</forceUpdate>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>com.github.siom79.japicmp</groupId>
                    <artifactId>japicmp-maven-plugin</artifactId>
                    <version>0.13.0</version>
                    <configuration>
                        <skip>${japicmp.skip}</skip>
                        <parameter>
                            <ignoreMissingOldVersion>true</ignoreMissingOldVersion>
                            <ignoreMissingClasses>true</ignoreMissingClasses>
                            <skipHtmlReport>true</skipHtmlReport>
                            <skipDiffReport>true</skipDiffReport>
                            <skipXmlReport>true</skipXmlReport>
                            <breakBuildOnBinaryIncompatibleModifications>true</breakBuildOnBinaryIncompatibleModifications>
                            <breakBuildOnSourceIncompatibleModifications>true</breakBuildOnSourceIncompatibleModifications>
                        </parameter>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.projectlombok</groupId>
                    <artifactId>lombok-maven-plugin</artifactId>
                    <version>1.18.2.0</version>
                    <configuration>
                        <addOutputDirectory>false</addOutputDirectory>
                    </configuration>
                    <executions>
                        <execution>
                            <id>delombok</id>
                            <phase>generate-sources</phase>
                            <goals>
                                <goal>delombok</goal>
                            </goals>
                            <configuration>
                                <sourceDirectory>${project.basedir}/src/main/java</sourceDirectory>
                                <outputDirectory>${project.build.directory}/delombok</outputDirectory>
                            </configuration>
                        </execution>
                        <execution>
                            <id>test-delombok</id>
                            <phase>generate-test-sources</phase>
                            <goals>
                                <goal>testDelombok</goal>
                            </goals>
                            <configuration>
                                <sourceDirectory>${project.basedir}/src/test/java</sourceDirectory>
                                <outputDirectory>${project.build.directory}/delombok-test</outputDirectory>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>3.0.1</version>
                    <configuration>
                        <quiet>true</quiet>
                        <additionalOptions>${javadoc.opts}</additionalOptions>
                        <show>protected</show>
                        <groups>
                            <group>
                                <title>SAP S/4HANA</title>
                                <packages>com.sap.cloud.sdk.s4hana*</packages>
                            </group>
                            <group>
                                <title>Cloud Platform</title>
                                <packages>com.sap.cloud.sdk.cloudplatform*</packages>
                            </group>
                            <group>
                                <title>Framework Adaptations</title>
                                <packages>com.sap.cloud.sdk.frameworks*</packages>
                            </group>
                        </groups>
                        <sourcepath>
                            ${project.basedir}/target/delombok;
                            cloudplatform/auditlog/target/delombok;
                            cloudplatform/auditlog-scp-cf/target/delombok;
                            cloudplatform/auditlog-scp-neo/target/delombok;
                            cloudplatform/caching/target/delombok;
                            cloudplatform/concurrency-scp-neo/target/delombok;
                            cloudplatform/connectivity/target/delombok;
                            cloudplatform/connectivity-scp-cf/target/delombok;
                            cloudplatform/connectivity-scp-neo/target/delombok;
                            cloudplatform/core/target/delombok;
                            cloudplatform/core-scp-cf/target/delombok;
                            cloudplatform/core-scp-neo/target/delombok;
                            cloudplatform/metering/target/delombok;
                            cloudplatform/metering-scp-neo/target/delombok;
                            cloudplatform/security/target/delombok;
                            cloudplatform/security-scp-cf/target/delombok;
                            cloudplatform/security-scp-neo/target/delombok;
                            cloudplatform/servlet/target/delombok;
                            cloudplatform/tenant/target/delombok;
                            cloudplatform/tenant-scp-cf/target/delombok;
                            cloudplatform/tenant-scp-neo/target/delombok;
                            frameworks/cxf/target/delombok;
                            frameworks/eclipselink/target/delombok;
                            frameworks/eclipselink-javaee/target/delombok;
                            frameworks/hystrix/target/delombok;
                            frameworks/hystrix-scp-neo/target/delombok;
                            frameworks/javaee/target/delombok;
                            frameworks/jaxrs/target/delombok;
                            frameworks/jaxrs-gson/target/delombok;
                            frameworks/spring-web/target/delombok;
                            frameworks/liquibase/target/delombok;
                            frameworks/liquibase-javaee/target/delombok;
                            frameworks/togglz/target/delombok;
                            quality/common/target/delombok;
                            quality/httpclient-listener/target/delombok;
                            quality/odata-querylistener/target/delombok;
                            quality/pmd-rules/target/delombok;
                            quality/rfc-querylistener/target/delombok;
                            s4hana/connectivity/target/delombok;
                            s4hana/core/target/delombok;
                            s4hana/datamodel-bapi/bapi-api/target/delombok;
                            s4hana/datamodel-odata/odata-core/target/delombok;
                            s4hana/datamodel-odata/odata-api/target/delombok;
                            s4hana/datamodel-odata/odata-generator/target/delombok;
                            s4hana/datamodel-odata/odata-generator-cli/target/delombok;
                            s4hana/datamodel-odata/odata-generator-maven-plugin/target/delombok;
                            s4hana/datamodel-messaging/messaging-api/target/delombok;
                            s4hana/datamodel-messaging/messaging-core/target/delombok;
                            s4hana/datamodel-messaging/messaging-jms/target/delombok;
                            s4hana/fluent-result/target/delombok;
                            s4hana/rfc/target/delombok;
                            s4hana/testutil/target/delombok;
                            s4hana/soap/target/delombok;
                            services/scp-blockchain/target/delombok;
                            services/scp-machine-learning/target/delombok;
                            services/recast-ai/target/delombok;
                            services/blockchain/target/delombok;
                        </sourcepath>
                    </configuration>
                    <executions>
                        <execution>
                            <id>javadoc-jar</id>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>javadoc-aggregate</id>
                            <goals>
                                <goal>aggregate</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>3.0.1</version>
                    <configuration>
                        <forceCreation>true</forceCreation>
                    </configuration>
                    <executions>
                        <execution>
                            <goals>
                                <goal>jar-no-fork</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>versions-maven-plugin</artifactId>
                    <version>2.5</version>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>net.revelc.code.formatter</groupId>
                <artifactId>formatter-maven-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>net.revelc.code</groupId>
                <artifactId>impsort-maven-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>com.github.spotbugs</groupId>
                <artifactId>spotbugs-maven-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-pmd-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.whitesource</groupId>
                <artifactId>whitesource-maven-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>com.github.siom79.japicmp</groupId>
                <artifactId>japicmp-maven-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>disable-doclint-java8</id>
            <activation>
                <jdk>[1.8,)</jdk>
            </activation>
            <properties>
                <javadoc.opts>-Xdoclint:none</javadoc.opts>
            </properties>
        </profile>

        <profile>
            <id>docs</id>
            <activation>
                <property>
                    <name>docs</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.projectlombok</groupId>
                        <artifactId>lombok-maven-plugin</artifactId>
                    </plugin>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                    </plugin>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>build-test-modules</id>
            <activation>
                <property>
                    <name>!audience</name>
                </property>
            </activation>
            <modules>
                <module>tests</module>
            </modules>
        </profile>
    </profiles>

    <modules>
        <module>bom</module>
        <module>modules-bom</module>
        <module>cloudplatform</module>
        <module>frameworks</module>
        <module>s4hana</module>
        <module>quality</module>
        <module>archetypes</module>
        <module>plugins</module>
        <module>services</module>
    </modules>
</project>
