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

  <groupId>com.itextpdf</groupId>
  <artifactId>root</artifactId>
  <version>9.5.0</version>
  <packaging>pom</packaging>

  <name>iText</name>
  <description>A Free Java-PDF library</description>
  <url>https://itextpdf.com/</url>
  <inceptionYear>1998</inceptionYear>
  <organization>
    <name>Apryse Group NV</name>
    <url>https://itextpdf.com/</url>
  </organization>
  <licenses>
    <license>
      <name>GNU Affero General Public License v3</name>
      <url>http://www.fsf.org/licensing/licenses/agpl-3.0.html</url>
    </license>
  </licenses>

  <developers>
    <developer>
      <id>itext</id>
      <name>iText Software</name>
      <email>info@itextpdf.com</email>
      <url>https://www.itextpdf.com</url>
    </developer>
  </developers>

  <mailingLists>
    <mailingList>
      <name>iText on StackOverflow</name>
      <subscribe>https://stackoverflow.com/questions/tagged/itext</subscribe>
      <archive>https://stackoverflow.com/questions/tagged/itext</archive>
      <otherArchives>
        <otherArchive>http://news.gmane.org/gmane.comp.java.lib.itext.general</otherArchive>
        <otherArchive>http://itext-general.2136553.n4.nabble.com/</otherArchive>
        <otherArchive>http://www.junlu.com/2.html</otherArchive>
        <otherArchive>http://sourceforge.net/mailarchive/forum.php?forum_id=3273</otherArchive>
        <otherArchive>http://www.mail-archive.com/itext-questions%40lists.sourceforge.net/</otherArchive>
      </otherArchives>
    </mailingList>
  </mailingLists>

  <modules>
    <module>commons</module>
    <module>barcodes</module>
    <module>font-asian</module>
    <module>forms</module>
    <module>hyph</module>
    <module>io</module>
    <module>itextcore</module>
    <module>itext7core</module>
    <module>kernel</module>
    <module>layout</module>
    <module>pdfa</module>
    <module>pdftest</module>
    <module>sign</module>
    <module>styled-xml-parser</module>
    <module>svg</module>
    <module>bouncy-castle-fips-adapter</module>
    <module>bouncy-castle-adapter</module>
    <module>bouncy-castle-connector</module>
    <module>pdfua</module>
    <module>brotli-compressor</module>
  </modules>

  <scm>
    <connection>scm:git:ssh://git@git.itextsupport.com:7999/i7j/itextcore.git</connection>
    <url>https://git.itextsupport.com/projects/I7J/repos/itextcore</url>
  </scm>
  <issueManagement>
    <system>jira</system>
    <url>https://jira.itextsupport.com/</url>
  </issueManagement>
  <ciManagement>
    <system>jenkins-ci</system>
    <url>https://jenkins.itextsupport.com/</url>
  </ciManagement>

  <properties>
    <argLine>-Xmx1024m</argLine>
    <bouncycastle.version>1.81</bouncycastle.version>
    <dependencyCheck.version>7.0.0</dependencyCheck.version>
    <failsafe.version>3.0.0-M3</failsafe.version>
    <jacoco.version>0.8.4</jacoco.version>
    <java.version>1.8</java.version>
    <javadoc-additionalOptions />
    <javadoc-link>https://docs.oracle.com/javase/8/docs/api/</javadoc-link>
    <javadoc.version>3.7.0</javadoc.version>
    <junit.jupiter.version>5.10.2</junit.jupiter.version>
    <junit.platform.version>1.10.2</junit.platform.version>
    <junitparams.version>1.0.4</junitparams.version>
    <logback.version>1.3.14</logback.version>
    <jackson.core.version>2.17.0</jackson.core.version>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
    <maven.jar.version>3.1.0</maven.jar.version>
    <maven.source.version>3.0.1</maven.source.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <skipTests>true</skipTests>
    <slf4j.version>2.0.16</slf4j.version>
    <sonar.dependencyCheck.htmlReportPath>target/dependency-check-report.html</sonar.dependencyCheck.htmlReportPath>
    <sonar.dependencyCheck.reportPath>target/dependency-check-report.xml</sonar.dependencyCheck.reportPath>
    <surefire.version>3.0.0-M3</surefire.version>
    <apache.santuario.version>3.0.6</apache.santuario.version>

    <sharpen.builddotnet>false</sharpen.builddotnet>
    <sharpen.showdiff>false</sharpen.showdiff>
    <sharpen.phase>none</sharpen.phase>
    <sharpen.projectName>empty</sharpen.projectName>
    <sharpen.cSharpTargetFolder>empty</sharpen.cSharpTargetFolder>
    <sharpen.cSharpSourceCodeDestination />
    <sharpen.cSharpTestCodeDestination />
    <sharpen.extraDependencies>
    </sharpen.extraDependencies>

    <native.maven.plugin.version>0.10.1</native.maven.plugin.version>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>${slf4j.version}</version>
    </dependency>
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <version>${logback.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter</artifactId>
      <version>${junit.jupiter.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.platform</groupId>
      <artifactId>junit-platform-launcher</artifactId>
      <version>${junit.platform.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <repositories>
    <repository>
      <releases>
        <enabled>false</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
      <id>itext-snapshot</id>
      <name>iText Repository - snapshots</name>
      <url>https://repo.itextsupport.com/snapshot</url>
    </repository>
    <repository>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>itext-releases</id>
      <name>iText Repository - releases</name>
      <url>https://repo.itextsupport.com/releases</url>
    </repository>
  </repositories>
  <pluginRepositories>
    <pluginRepository>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>itext-releases</id>
      <name>iText Repository - releases</name>
      <url>https://repo.itextsupport.com/artifactory/releases</url>
    </pluginRepository>
  </pluginRepositories>

  <build>
    <finalName>itext-${project.artifactId}-${project.version}</finalName>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.pitest</groupId>
          <artifactId>pitest-maven</artifactId>
          <version>1.5.1</version>
          <executions>
            <execution>
              <id>default-mutationCoverage</id>
              <goals>
                <goal>mutationCoverage</goal>
              </goals>
            </execution>
          </executions>
          <configuration>
            <timestampedReports>false</timestampedReports>
            <outputFormats>
              <outputFormat>XML</outputFormat>
              <outputFormat>HTML</outputFormat>
            </outputFormats>
            <targetClasses>
              <param>com.itextpdf*</param>
            </targetClasses>
            <targetTests>
              <param>com.itextpdf*</param>
            </targetTests>
            <historyInputFile>${project.build.directory}/pitest.history</historyInputFile>
            <historyOutputFile>${project.build.directory}/pitest.history</historyOutputFile>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>sharpen</groupId>
        <artifactId>sharpen-maven-plugin</artifactId>
        <version>1.0-SNAPSHOT</version>
      </plugin>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <version>5.1.6</version>
        <extensions>true</extensions>
        <executions>
          <execution>
            <id>bundle-manifest</id>
            <phase>process-classes</phase>
            <goals>
              <goal>manifest</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <unpackBundle>true</unpackBundle>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.8.0</version>
        <configuration>
          <source>${java.version}</source>
          <target>${java.version}</target>
        </configuration>
      </plugin>
      <!-- Run integration tests -->
      <plugin>
        <artifactId>maven-failsafe-plugin</artifactId>
        <version>${failsafe.version}</version>
        <configuration>
          <skipTests>${skipTests}</skipTests>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <version>${maven.jar.version}</version>
        <configuration>
          <skipIfEmpty>true</skipIfEmpty>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>${javadoc.version}</version>
        <executions>
          <execution>
            <id>site-javadoc</id>
            <phase>site</phase>
            <goals>
              <goal>aggregate</goal>
            </goals>
            <configuration>
              <failOnError>false</failOnError>
            </configuration>
          </execution>
          <execution>
            <id>attach-javadocs</id>
            <phase>package</phase>
            <goals>
              <goal>jar</goal>
            </goals>
            <configuration>
              <failOnError>false</failOnError>
            </configuration>
          </execution>
        </executions>
        <configuration>
          <quiet>true</quiet>
          <source>8</source>
          <detectLinks>false</detectLinks>
          <additionalOptions>${javadoc-additionalOptions}</additionalOptions>
          <links>
            <link>${javadoc-link}</link>
          </links>
          <sourceFileExcludes>
            <!-- com.itextpdf.io.util -->
            <sourceFileExclude>com/itextpdf/io/util/ArrayUtil.java</sourceFileExclude>
            <sourceFileExclude>com/itextpdf/io/util/DateTimeUtil.java</sourceFileExclude>
            <sourceFileExclude>com/itextpdf/io/util/DecimalFormatUtil.java</sourceFileExclude>
            <sourceFileExclude>com/itextpdf/io/util/EncodingUtil.java</sourceFileExclude>
            <sourceFileExclude>com/itextpdf/io/util/EnumUtil.java</sourceFileExclude>
            <sourceFileExclude>com/itextpdf/io/util/ExceptionUtil.java</sourceFileExclude>
            <sourceFileExclude>com/itextpdf/io/util/FileUtil.java</sourceFileExclude>
            <sourceFileExclude>com/itextpdf/io/util/FilterUtil.java</sourceFileExclude>
            <sourceFileExclude>com/itextpdf/io/util/GenericArray.java</sourceFileExclude>
            <sourceFileExclude>com/itextpdf/io/util/HashCode.java</sourceFileExclude>
            <sourceFileExclude>com/itextpdf/io/util/IdelOutputStream.java</sourceFileExclude>
            <sourceFileExclude>com/itextpdf/io/util/IntHashtable.java</sourceFileExclude>
            <sourceFileExclude>com/itextpdf/io/util/MessageFormatUtil.java</sourceFileExclude>
            <sourceFileExclude>com/itextpdf/io/util/NumberUtil.java</sourceFileExclude>
            <sourceFileExclude>com/itextpdf/io/util/ResourceUtil.java</sourceFileExclude>
            <sourceFileExclude>com/itextpdf/io/util/StreamUtil.java</sourceFileExclude>
            <sourceFileExclude>com/itextpdf/io/util/SystemUtil.java</sourceFileExclude>
            <sourceFileExclude>com/itextpdf/io/util/TextUtil.java</sourceFileExclude>
            <sourceFileExclude>com/itextpdf/io/util/UrlUtil.java</sourceFileExclude>

            <!-- com.itextpdf.io.codec.brotli -->
            <sourceFileExclude>com/itextpdf/io/codec/brotli/dec/*.java</sourceFileExclude>

            <!-- styled-xml-parser -->
            <sourceFileExclude>com/itextpdf/styledxmlparser/PortUtil.java</sourceFileExclude>

            <!-- com.itextpdf.styledxmlparser.jsoup -->
            <sourceFileExclude>com/itextpdf/styledxmlparser/jsoup/**/*.java</sourceFileExclude>

            <!-- kernel -->
            <sourceFileExclude>com/itextpdf/kernel/crypto/CryptoUtil.java</sourceFileExclude>

            <!-- svg -->
            <sourceFileExclude>com/itextpdf/svg/utils/SvgCoordinateUtils.java</sourceFileExclude>
            <!-- sharpen mapping -->
            <sourceFileExclude>**/sharpenconfig/**</sourceFileExclude>
          </sourceFileExcludes>
          <groups>
            <group>
              <title>Barcodes</title>
              <packages>com.itextpdf.barcodes*</packages>
            </group>
            <group>
              <title>Asian Fonts</title>
              <packages>com.itextpdf.font-asian*</packages>
            </group>
            <group>
              <title>Forms</title>
              <packages>com.itextpdf.forms*</packages>
            </group>
            <group>
              <title>Hyphenation</title>
              <packages>com.itextpdf.hyph*</packages>
            </group>
            <group>
              <title>Input / Output</title>
              <packages>com.itextpdf.io*</packages>
            </group>
            <group>
              <title>Kernel</title>
              <packages>com.itextpdf.kernel*</packages>
            </group>
            <group>
              <title>Layout</title>
              <packages>com.itextpdf.layout*</packages>
            </group>
            <group>
              <title>Native Image Test</title>
              <packages>com.itextpdf.nativeimage*</packages>
            </group>
            <group>
              <title>PDF/A</title>
              <packages>com.itextpdf.pdfa*</packages>
            </group>
            <group>
              <title>PDF/UA</title>
              <packages>com.itextpdf.pdfua*</packages>
            </group>
            <group>
              <title>Signatures</title>
              <packages>com.itextpdf.signatures*</packages>
            </group>
            <group>
              <title>Styled XML Parser</title>
              <packages>com.itextpdf.styledxmlparser*</packages>
            </group>
            <group>
              <title>SVG</title>
              <packages>com.itextpdf.svg*</packages>
            </group>
          </groups>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-source-plugin</artifactId>
        <version>${maven.source.version}</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <phase>package</phase>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <excludeResources>true</excludeResources>
        </configuration>
      </plugin>
      <!-- Run unit tests -->
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>${surefire.version}</version>
        <configuration>
          <skipTests>${skipTests}</skipTests>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>tidy-maven-plugin</artifactId>
        <version>1.1.0</version>
        <executions>
          <execution>
            <goals>
              <goal>pom</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <reporting>
    <plugins>
      <plugin>
        <artifactId>maven-changelog-plugin</artifactId>
        <version>2.3</version>
      </plugin>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>${javadoc.version}</version>
        <configuration>
          <failOnError>false</failOnError>
          <quiet>true</quiet>
          <source>8</source>
          <additionalOptions>${javadoc-additionalOptions}</additionalOptions>
          <links>
            <link>${javadoc-link}</link>
          </links>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-jxr-plugin</artifactId>
        <version>2.5</version>
      </plugin>
      <plugin>
        <artifactId>maven-linkcheck-plugin</artifactId>
        <version>1.2</version>
        <configuration>
          <skip>true</skip>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>2.8</version>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-report-plugin</artifactId>
        <version>${surefire.version}</version>
      </plugin>
    </plugins>
  </reporting>

  <profiles>
    <profile>
      <id>java9+</id>
      <activation>
        <jdk>[9,)</jdk>
      </activation>
      <properties>
        <javadoc-additionalOptions>-html5</javadoc-additionalOptions>
        <javadoc-link>https://docs.oracle.com/javase/9/docs/api/</javadoc-link>
      </properties>
    </profile>
    <profile>
      <id>develop</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
    </profile>
    <profile>
      <id>qa</id>
      <build>
        <plugins>
          <!-- Compares current version to the latest released version to prevent breaking changes -->
          <plugin>
            <groupId>com.github.siom79.japicmp</groupId>
            <artifactId>japicmp-maven-plugin</artifactId>
            <version>0.23.1</version>
            <executions>
              <execution>
                <phase>verify</phase>
                <goals>
                  <goal>cmp</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <parameter>
                <onlyModified>true</onlyModified>
                <onlyBinaryIncompatible>true</onlyBinaryIncompatible>
                <ignoreMissingClasses>true</ignoreMissingClasses>
                <excludes>
                  <!-- Contains interfaces for bouncycastle wrappers which can be changes in any time -->
                  <exclude>com.itextpdf.commons.bouncycastle</exclude>
                  <!-- Updated embedded org.brotli.dec dependency -->
                  <exclude>com.itextpdf.io.codec.brotli.dec</exclude>
                </excludes>
                <excludeModules>
                  <excludeModule>brotli-compressor</excludeModule>
                  <excludeModule>bouncy-castle-adapter</excludeModule>
                  <excludeModule>bouncy-castle-connector</excludeModule>
                  <excludeModule>bouncy-castle-fips-adapter</excludeModule>
                  <excludeModule>pdftest</excludeModule>
                </excludeModules>
              </parameter>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.apache.felix</groupId>
            <artifactId>maven-bundle-plugin</artifactId>
            <executions>
              <execution>
                <id>bundle-manifest</id>
                <phase />
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-javadoc-plugin</artifactId>
            <configuration>
              <skip>true</skip>
            </configuration>
          </plugin>
          <plugin>
            <artifactId>maven-resources-plugin</artifactId>
            <version>3.3.1</version>
            <executions>
              <execution>
                <id>default-resources</id>
                <phase />
              </execution>
              <execution>
                <id>default-testResources</id>
                <phase />
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-source-plugin</artifactId>
            <configuration>
              <skipSource>true</skipSource>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>tidy-maven-plugin</artifactId>
            <configuration>
              <skip>true</skip>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.owasp</groupId>
            <artifactId>dependency-check-maven</artifactId>
            <version>${dependencyCheck.version}</version>
            <dependencies>
              <dependency>
                <groupId>mysql</groupId>
                <artifactId>mysql-connector-java</artifactId>
                <version>8.0.33</version>
              </dependency>
            </dependencies>
            <configuration>
              <autoUpdate>false</autoUpdate>
              <connectionString />
              <databaseDriverName>com.mysql.cj.jdbc.Driver</databaseDriverName>
              <databasePassword />
              <databaseUser />
              <format>ALL</format>
            </configuration>
            <executions>
              <execution>
                <goals>
                  <goal>aggregate</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
      <properties>
        <maven.main.skip>true</maven.main.skip>
        <maven.test.skip>true</maven.test.skip>
      </properties>
    </profile>
    <profile>
      <id>test</id>
      <build>
        <plugins>
          <!-- Run integration tests -->
          <plugin>
            <artifactId>maven-failsafe-plugin</artifactId>
            <executions>
              <execution>
                <goals>
                  <goal>integration-test</goal>
                  <goal>verify</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <skipTests>false</skipTests>
              <includes>
                <include>**/*.java</include>
              </includes>
              <groups>SlowTest,PerformanceTest,IntegrationTest,BouncyCastleIntegrationTest,SampleTest,UnitTest</groups>
              <reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
              <argLine>@{jacoco.agent.argLine}</argLine>
              <threadCount>1</threadCount>
            </configuration>
          </plugin>
          <plugin>
            <artifactId>maven-javadoc-plugin</artifactId>
            <configuration>
              <skip>true</skip>
            </configuration>
          </plugin>
          <plugin>
            <artifactId>maven-source-plugin</artifactId>
            <configuration>
              <skipSource>true</skipSource>
            </configuration>
          </plugin>
          <!-- Run unit tests -->
          <plugin>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <skipTests>false</skipTests>
              <groups>UnitTest,BouncyCastleUnitTest</groups>
              <argLine>@{jacoco.agent.argLine}</argLine>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>tidy-maven-plugin</artifactId>
            <configuration>
              <skip>true</skip>
            </configuration>
          </plugin>
          <!-- Compute test coverage for Sonar BEWARE: Sonar
                                  doesn't run the verify phase, it has to be forced by setting -Dsonar.phase=verify -->
          <plugin>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco-maven-plugin</artifactId>
            <version>${jacoco.version}</version>
            <executions>
              <execution>
                <id>agent</id>
                <goals>
                  <goal>prepare-agent</goal>
                </goals>
              </execution>
              <execution>
                <id>report</id>
                <phase>site</phase>
                <goals>
                  <goal>report</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <propertyName>jacoco.agent.argLine</propertyName>
              <!-- default: argLine -->
              <includes>
                <include>com/itextpdf/**</include>
              </includes>
              <destFile>${project.build.directory}/jacoco-integration.exec</destFile>
              <!-- agent -->
              <dataFile>${project.build.directory}/jacoco-integration.exec</dataFile>
              <!-- report -->
              <jmx>true</jmx>
              <!-- jmx is set to true as a workaround for the code coverage measurement problem with upgrade
              to junit 4.13.2. See more in DEVSIX-4761. With the future jacoco/junit upgrades the necessity in
              setting this parameter might fade. It's not used for anything else but making sure code coverage is
              measured correctly. -->
            </configuration>
          </plugin>
          <plugin><!-- A fork of https://github.com/sparebank1utvikling/turbo-maven-plugin; available at https://repo.itextsupport.com/artifactory/releases -->
            <groupId>com.apryse</groupId>
            <artifactId>apryse-turbo-maven-plugin</artifactId>
            <version>1.0.0</version>
            <extensions>true</extensions>
            <configuration>
              <enabled>false</enabled>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <!-- This profile shall always go after test profile because it overrides several plugins -->
    <profile>
      <id>bouncy-castle-fips-test</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-failsafe-plugin</artifactId>
            <configuration>
              <includes>
                <include>**/*.java</include>
              </includes>
              <groups>BouncyCastleIntegrationTest</groups>
            </configuration>
            <executions>
              <execution>
                <id>general-mode</id>
                <goals>
                  <goal>integration-test</goal>
                  <goal>verify</goal>
                </goals>
              </execution>
              <execution>
                <id>approved-mode</id>
                <goals>
                  <goal>integration-test</goal>
                  <goal>verify</goal>
                </goals>
                <configuration>
                  <systemPropertyVariables>
                    <org.bouncycastle.fips.approved_only>true</org.bouncycastle.fips.approved_only>
                  </systemPropertyVariables>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <groups>BouncyCastleUnitTest</groups>
            </configuration>
            <executions>
              <execution>
                <goals>
                  <goal>test</goal>
                </goals>
                <id>general-mode</id>
              </execution>
              <execution>
                <id>approved-mode</id>
                <goals>
                  <goal>test</goal>
                </goals>
                <configuration>
                  <systemPropertyVariables>
                    <org.bouncycastle.fips.approved_only>true</org.bouncycastle.fips.approved_only>
                  </systemPropertyVariables>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <!-- This profile is only used by Jenkins. -->
      <id>mutationtest</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.pitest</groupId>
            <artifactId>pitest-maven</artifactId>
          </plugin>
        </plugins>
      </build>
      <properties>
        <sonar.pitest.mode>reuseReport</sonar.pitest.mode>
      </properties>
    </profile>
    <profile>
      <id>artifactory</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-javadoc-plugin</artifactId>
            <configuration>
              <failOnError>false</failOnError>
              <quiet>true</quiet>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>tidy-maven-plugin</artifactId>
            <configuration>
              <skip>true</skip>
            </configuration>
          </plugin>
        </plugins>
      </build>
      <properties>
        <maven.main.skip>true</maven.main.skip>
        <maven.test.skip>true</maven.test.skip>
      </properties>
    </profile>
    <profile>
      <id>build-sharpen-configs</id>
      <dependencies>
        <dependency>
          <groupId>sharpen</groupId>
          <artifactId>sharpen-config</artifactId>
          <version>1.0-SNAPSHOT</version>
          <scope>provided</scope>
        </dependency>
        <dependency>
          <groupId>sharpen</groupId>
          <artifactId>standard-framework-mapping</artifactId>
          <version>1.0-SNAPSHOT</version>
        </dependency>
      </dependencies>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>build-helper-maven-plugin</artifactId>
            <version>3.6.0</version>
            <executions>
              <execution>
                <id>add-sharpenConfiguration-source</id>
                <phase>generate-sources</phase>
                <goals>
                  <goal>add-source</goal>
                  <goal>add-resource</goal>
                </goals>
                <configuration>
                  <sources>
                    <source>${project.basedir}/src/sharpenconfig/java</source>
                  </sources>
                  <resources>
                    <resource>
                      <directory>${project.basedir}/src/sharpenconfig/resources</directory>
                    </resource>
                  </resources>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-jar-plugin</artifactId>
            <version>3.4.2</version>
            <executions>
              <execution>
                <id>sharpen-config-jar</id>
                <goals>
                  <goal>jar</goal>
                </goals>
                <phase>package</phase>
                <configuration>
                  <classifier>sharpen-configuration</classifier>
                  <includes>
                    <include>**/SharpenConfig*.class</include>
                    <include>**/sharpen.config.MappingConfiguration</include>
                  </includes>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>with-sharpen</id>
      <dependencies>
        <dependency>
          <groupId>sharpen</groupId>
          <artifactId>sharpen-config</artifactId>
          <version>1.0-SNAPSHOT</version>
          <scope>provided</scope>
        </dependency>
        <dependency>
          <groupId>sharpen</groupId>
          <artifactId>standard-framework-mapping</artifactId>
          <version>1.0-SNAPSHOT</version>
        </dependency>
      </dependencies>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>build-helper-maven-plugin</artifactId>
            <version>3.6.0</version>
            <executions>
              <execution>
                <id>add-sharpenConfiguration-source</id>
                <phase>generate-sources</phase>
                <goals>
                  <goal>add-source</goal>
                  <goal>add-resource</goal>
                </goals>
                <configuration>
                  <sources>
                    <source>${project.basedir}/src/sharpenconfig/java</source>
                  </sources>
                  <resources>
                    <resource>
                      <directory>${project.basedir}/src/sharpenconfig/resources</directory>
                    </resource>
                  </resources>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-jar-plugin</artifactId>
            <version>3.4.2</version>
            <executions>
              <execution>
                <id>sharpen-config-jar</id>
                <goals>
                  <goal>jar</goal>
                </goals>
                <phase>package</phase>
                <configuration>
                  <classifier>sharpen-configuration</classifier>
                  <includes>
                    <include>**/SharpenConfig*.class</include>
                    <include>**/sharpen.config.MappingConfiguration</include>
                  </includes>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
        <pluginManagement>
          <plugins>
            <plugin>
              <groupId>sharpen</groupId>
              <artifactId>sharpen-maven-plugin</artifactId>
              <executions>
                <execution>
                  <phase>${sharpen.phase}</phase>
                  <goals>
                    <goal>sharpen</goal>
                  </goals>
                </execution>
              </executions>
              <configuration>
                <buildDotnet>${sharpen.builddotnet}</buildDotnet>
                <showDiff>${sharpen.showdiff}</showDiff>
                <projectName>${sharpen.projectName}</projectName>
                <cSharpTargetFolder>${sharpen.cSharpTargetFolder}</cSharpTargetFolder>
                <cSharpSourceCodeDestination>${sharpen.cSharpSourceCodeDestination}</cSharpSourceCodeDestination>
                <cSharpTestCodeDestination>${sharpen.cSharpTestCodeDestination}</cSharpTestCodeDestination>
                <sourceCodeFiles>
                  <file>**/src/main/java/**/*.java</file>
                </sourceCodeFiles>
                <testCodeFiles>
                  <file>**/src/test/java/**/*.java</file>
                </testCodeFiles>
              </configuration>
            </plugin>
          </plugins>
        </pluginManagement>
      </build>
    </profile>
    <profile>
      <id>sharpen-configuration</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-jar-plugin</artifactId>
            <version>3.4.2</version>
            <executions>
              <execution>
                <id>default-jar</id>
                <goals>
                  <goal>jar</goal>
                </goals>
                <phase>package</phase>
                <configuration>
                  <excludes>
                    <exclude>**/SharpenConfig*.class</exclude>
                    <exclude>**/sharpen.config.MappingConfiguration</exclude>
                  </excludes>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>native</id>
      <dependencies>
        <dependency>
          <groupId>org.graalvm.nativeimage</groupId>
          <artifactId>svm</artifactId>
          <version>22.3.5</version>
          <scope>provided</scope>
        </dependency>
        <dependency>
          <groupId>org.bouncycastle</groupId>
          <artifactId>bcprov-jdk18on</artifactId>
          <version>${bouncycastle.version}</version>
        </dependency>
      </dependencies>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>build-helper-maven-plugin</artifactId>
            <version>3.6.0</version>
            <executions>
              <execution>
                <id>add-source</id>
                <phase>generate-sources</phase>
                <goals>
                  <goal>add-source</goal>
                </goals>
                <configuration>
                  <sources>
                    <source>${basedir}/../resources/graalvm</source>
                  </sources>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.graalvm.buildtools</groupId>
            <artifactId>native-maven-plugin</artifactId>
            <version>${native.maven.plugin.version}</version>
            <extensions>true</extensions>
            <executions>
              <execution>
                <id>test-native</id>
                <goals>
                  <goal>test</goal>
                </goals>
                <phase>test</phase>
              </execution>
            </executions>
            <configuration>
              <buildArgs>
                <arg>
                  --initialize-at-build-time=org.junit.validator.PublicClassValidator
                  --initialize-at-build-time=org.junit.platform.engine.TestTag
                  --initialize-at-run-time=org.bouncycastle.crypto.prng.SP800SecureRandom
                  --initialize-at-run-time=org.bouncycastle.jcajce.provider.drbg.DRBG$NonceAndIV
                  --initialize-at-run-time=org.bouncycastle.jcajce.provider.drbg.DRBG$Default

                  -H:IncludeResources=lib/windows-x86_64/brotli.dll
                  -H:IncludeResources=lib/linux-aarch64/libbrotli.so
                  -H:IncludeResources=lib/linux-x86_64/libbrotli.so

                  --initialize-at-run-time=com.aayushatharva.brotli4j.Brotli4jLoader

                  --features=com.itextpdf.BouncyCastleFeature

                  --enable-all-security-services
                  --enable-url-protocols=http,https,ftp

                  -H:+AddAllCharsets
                  -H:ReflectionConfigurationFiles=${basedir}/../resources/graalvm/reflect-config.json
                  <!-- Graalvm requires VisualStudio 2022 on Windows but it also works with earlier versions.
                       So this is a workaround to run tests on TC agents having earlier VS versions installed. -->
                  -H:-CheckToolchain
                </arg>
              </buildArgs>
              <skipTests>false</skipTests>
              <metadataRepository>
                <enabled>true</enabled>
              </metadataRepository>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>