<project xmlns="http://maven.apache.org/POM/4.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <artifactId>oss-parent</artifactId>
    <groupId>org.sonatype.oss</groupId>
    <version>9</version>
  </parent>

  <groupId>org.openpreservation.odf</groupId>
  <artifactId>odf-validator</artifactId>
  <version>1.16.2</version>
  <packaging>pom</packaging>

  <modules>
    <module>odf-core</module>
    <module>odf-apps</module>
    <module>odf-reporting</module>
  </modules>

  <name>ODF spreadsheet validator.</name>
  <description>Open source validation of Open Document Format spreadsheets.</description>
  <url>https://github.com/openpreserve/odf-validator/</url>
  <inceptionYear>2022</inceptionYear>
  <organization>
    <name>The Open Preservation Foundation</name>
    <url>http://www.openpreserve.org/</url>
  </organization>
  <licenses>
    <license>
      <name>BSD 3-Clause License</name>
      <url>https://opensource.org/licenses/BSD-3-Clause</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <developers>
    <developer>
      <email>carl@openpreservation.org</email>
      <name>Carl Wilson</name>
      <timezone>+00:00</timezone>
      <url>https://github.com/carlwilson</url>
      <organization>Open Preservation Foundation</organization>
      <organizationUrl>http://openpreservation.org</organizationUrl>
      <id>carlwilson</id>
    </developer>
  </developers>
  <contributors>
    <contributor>
      <name>Asbjørn Skødt</name>
      <timezone>+01:00</timezone>
      <url>https://github.com/Asbjoedt</url>
      <organization>Rigsarkivet - The Danish National Archives</organization>
      <organizationUrl>https://www.rigsarkivet.dk/</organizationUrl>
    </contributor>
    <contributor>
      <name>Martin Dew Hattens</name>
      <timezone>+01:00</timezone>
      <url>https://github.com/dewhattens</url>
      <organization>Rigsarkivet - The Danish National Archives</organization>
      <organizationUrl>https://www.rigsarkivet.dk/</organizationUrl>
    </contributor>
  </contributors>

  <scm>
    <url>https://github.com/openpreserve/odf-validator/</url>
    <connection>scm:git:https://github.com/openpreserve/odf-validator.git</connection>
    <developerConnection>scm:git:git@github.com:openpreserve/odf-validator.git</developerConnection>
  </scm>
  <issueManagement>
    <url>https://github.com/openpreserve/odf-validator/issues/</url>
    <system>GitHub Issues</system>
  </issueManagement>

  <distributionManagement>
     <site>
        <id>${project.artifactId}-site</id>
        <url>${project.baseUri}</url>
     </site>
  </distributionManagement>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <mvn.assembly.version>3.6.0</mvn.assembly.version>
    <mvn.clean.version>3.3.1</mvn.clean.version>
    <mvn.compiler.version>3.11.0</mvn.compiler.version>
    <mvn.dependency.version>3.6.0</mvn.dependency.version>
    <mvn.deploy.version>3.1.1</mvn.deploy.version>
    <mvn.enforcer.version>3.3.0</mvn.enforcer.version>
    <mvn.gpg.version>3.1.0</mvn.gpg.version>
    <mvn.install.version>3.1.1</mvn.install.version>
    <mvn.jar.version>3.3.0</mvn.jar.version>
    <mvn.javadoc.version>3.5.0</mvn.javadoc.version>
    <mvn.release.version>3.0.1</mvn.release.version>
    <mvn.reportsinfo.version>3.5.0</mvn.reportsinfo.version>
    <mvn.resources.version>3.3.1</mvn.resources.version>
    <mvn.site.version>3.12.1</mvn.site.version>
    <mvn.source.version>3.3.0</mvn.source.version>
    <mvn.surefire.version>3.1.2</mvn.surefire.version>
    <jacoco.version>0.8.10</jacoco.version>
    <java.source.version>11</java.source.version>
    <java.target.version>11</java.target.version>
    <junit.version>4.13.2</junit.version>
    <mvn.target.release>11</mvn.target.release>
    <mycila.license.version>4.2</mycila.license.version>
  </properties>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-assembly-plugin</artifactId>
          <version>${mvn.assembly.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-clean-plugin</artifactId>
          <version>${mvn.clean.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>${mvn.dependency.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>${mvn.compiler.version}</version>
          <configuration>
            <source>${java.source.version}</source>
            <target>${java.target.version}</target>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-enforcer-plugin</artifactId>
          <version>${mvn.enforcer.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-install-plugin</artifactId>
          <version>${mvn.install.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>${mvn.jar.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <version>${mvn.resources.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-site-plugin</artifactId>
          <version>${mvn.site.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>${mvn.source.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>${mvn.javadoc.version}</version>
          <configuration>
            <doclint>none</doclint>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-gpg-plugin</artifactId>
          <version>${mvn.gpg.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>${mvn.release.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>${mvn.deploy.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>${mvn.surefire.version}</version>
        </plugin>
        <plugin>
          <groupId>org.jacoco</groupId>
          <artifactId>jacoco-maven-plugin</artifactId>
          <version>${jacoco.version}</version>
        </plugin>
        <plugin>
          <groupId>com.mycila</groupId>
          <artifactId>license-maven-plugin</artifactId>
          <version>${mycila.license.version}</version>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>${mvn.enforcer.version}</version>
        <executions>
          <execution>
            <id>enforce-maven</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireMavenVersion>
                  <version>3.0</version>
                </requireMavenVersion>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
          <execution>
            <id>report</id>
            <phase>prepare-package</phase>
            <goals>
              <goal>report</goal>
            </goals>
          </execution>
          <execution>
              <id>report-aggregate</id>
              <phase>verify</phase>
              <goals>
                  <goal>report-aggregate</goal>
              </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <configuration>
          <autoVersionSubmodules>true</autoVersionSubmodules>
          <useReleaseProfile>false</useReleaseProfile>
          <releaseProfiles>release</releaseProfiles>
          <goals>deploy</goals>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <executions>
          <execution>
            <!--  Copy izpack resources -->
            <id>verapdf-scripts</id>
            <phase>validate</phase>
            <goals>
              <goal>copy-resources</goal>
            </goals>

            <configuration>
              <outputDirectory>./</outputDirectory>
              <resources>
                <resource>
                  <!--  Filter batch file copy to replace version number with current version number. -->
                  <directory>src/main/resources/org/openpreservation/odf/batch</directory>
                  <filtering>true</filtering>
                </resource>
                <resource>
                  <!--  Filter batch file copy to replace version number with current version number. -->
                  <directory>src/main/resources/org/openpreservation/odf/docs</directory>
                  <filtering>true</filtering>
                </resource>
              </resources>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <reporting>
    <outputDirectory>docs/site</outputDirectory>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>${mvn.reportsinfo.version}</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>${mvn.javadoc.version}</version>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>${jacoco.version}</version>
        <configuration>
          <outputDirectory>docs/site/jacoco</outputDirectory>
        </configuration>
      </plugin>
    </plugins>
  </reporting>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>io.github.relaxng</groupId>
        <artifactId>jing</artifactId>
        <version>20181101</version>
      </dependency>
      <!-- https://mvnrepository.com/artifact/org.apache.commons/commons-compress -->
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-compress</artifactId>
        <version>1.27.1</version>
      </dependency>
      <!-- https://mvnrepository.com/artifact/junit/junit -->
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.13.2</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>nl.jqno.equalsverifier</groupId>
        <artifactId>equalsverifier</artifactId>
        <version>3.15.1</version>
        <scope>test</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <profiles>
    <profile>
      <id>license-header</id>
      <build>
        <plugins>
          <plugin>
            <groupId>com.mycila</groupId>
            <artifactId>license-maven-plugin</artifactId>
            <configuration>
              <header>license/template/license.txt</header>
              <properties>
                <owner>Open Preservation Foundation</owner>
                <email>info@openpreservation.org</email>
              </properties>
              <excludes>
                <exclude>license/template/**</exclude>
                <exclude>src/test/resources/**</exclude>
                <exclude>src/main/resources/**</exclude>
              </excludes>
            </configuration>
            <executions>
              <execution>
                <phase>prepare-package</phase>
                <goals>
                  <goal>format</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>release-sign-artifacts</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>

      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-release-plugin</artifactId>
            <configuration>
              <autoVersionSubmodules>true</autoVersionSubmodules>
              <useReleaseProfile>false</useReleaseProfile>
              <releaseProfiles>release</releaseProfiles>
              <goals>deploy</goals>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>ossrh</id>
      <distributionManagement>
        <snapshotRepository>
          <id>ossrh</id>
          <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
          <id>ossrh</id>
          <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
      </distributionManagement>
    </profile>

    <profile>
      <id>opf</id>
      <distributionManagement>
        <snapshotRepository>
          <id>opf-artefactory</id>
          <url>https://artifactory.openpreservation.org/artifactory/opf-dev-local/</url>
        </snapshotRepository>
        <repository>
          <id>opf-artefactory</id>
          <url>https://artifactory.openpreservation.org/artifactory/opf-dev-local/</url>
        </repository>
      </distributionManagement>
    </profile>

  </profiles>

</project>
