<?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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>org.eclipse.jetty.toolchain</groupId>
  <artifactId>jetty-xhtml-schemas</artifactId>
  <packaging>jar</packaging>
  <version>1.4</version>

  <name>Jetty Toolchain :: XHTML Schemas</name>
  <description>XHTML Schemas and utilities</description>
  <url>https://eclipse.dev/jetty/</url>
  <inceptionYear>1995</inceptionYear>

  <licenses>
    <license>
      <name>Apache Software License - Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0</url>
    </license>
    <license>
      <name>Eclipse Public License - Version 1.0</name>
      <url>http://www.eclipse.org/org/documents/epl-v10.php</url>
    </license>
  </licenses>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <compiler.source>11</compiler.source>
    <compiler.target>11</compiler.target>
    <compiler.release>11</compiler.release>

    <maven-surefire-plugin.version>3.0.0-M7</maven-surefire-plugin.version>
    <license-maven-plugin.version>4.3</license-maven-plugin.version>
    <maven-enforcer-plugin.version>3.3.0</maven-enforcer-plugin.version>
    <maven-remote-resources-plugin.version>3.1.0</maven-remote-resources-plugin.version>
    <maven-release-plugin.version>3.0.1</maven-release-plugin.version>
    <maven-javadoc-plugin.version>3.6.0</maven-javadoc-plugin.version>
    <maven-source-plugin.version>3.3.0</maven-source-plugin.version>
    <maven-compiler-plugin.version>3.11.0</maven-compiler-plugin.version>
  </properties>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>${maven-compiler-plugin.version}</version>
        <configuration>
          <source>${compiler.source}</source>
          <target>${compiler.target}</target>
          <release>${compiler.release}</release>
          <showWarnings>true</showWarnings>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>${maven-release-plugin.version}</version>
        <configuration>
          <useReleaseProfile>true</useReleaseProfile>
          <releaseProfiles>eclipse-release</releaseProfiles>
          <goals>deploy</goals>
          <preparationGoals>clean install</preparationGoals>
          <mavenExecutorId>forked-path</mavenExecutorId>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-remote-resources-plugin</artifactId>
        <version>${maven-remote-resources-plugin.version}</version>
        <executions>
          <execution>
            <phase>generate-resources</phase>
            <goals>
              <goal>process</goal>
            </goals>
            <configuration>
              <resourceBundles>
                <resourceBundle>org.eclipse.jetty.toolchain:jetty-artifact-remote-resources:1.2</resourceBundle>
              </resourceBundles>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>${maven-enforcer-plugin.version}</version>
        <executions>
          <execution>
            <id>enforce-build-env</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <phase>validate</phase>
            <configuration>
              <rules>
                <requireMavenVersion>
                  <version>[3.8.4,)</version>
                  <message>[ERROR] OLD MAVEN [${maven.version}] in use, Jetty ${project.version} requires Maven 3.8.4 or newer</message>
                </requireMavenVersion>
                <requireJavaVersion>
                  <version>[11,)</version>
                  <message>[ERROR] OLD JDK [${java.version}] in use. Jetty ${project.version} requires JDK 11 or newer</message>
                </requireJavaVersion>
                <requireUpperBoundDeps />
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>com.mycila</groupId>
        <artifactId>license-maven-plugin</artifactId>
        <version>${license-maven-plugin.version}</version>
        <configuration>
          <header>header-template.txt</header>
          <failIfMissing>true</failIfMissing>
          <aggregate>true</aggregate>
          <strictCheck>true</strictCheck>
          <mapping>
            <java>DOUBLESLASH_STYLE</java>
          </mapping>
          <includes>
            <include>**/*.java</include>
          </includes>
        </configuration>
        <executions>
          <execution>
            <id>check-headers</id>
            <phase>validate</phase>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>${maven-surefire-plugin.version}</version>
        <configuration>
          <systemPropertyVariables>
            <junit.jupiter.extensions.autodetection.enabled>true</junit.jupiter.extensions.autodetection.enabled>
            <jetty.testtracker.log>${jetty.testtracker.log}</jetty.testtracker.log>
          </systemPropertyVariables>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>eclipse-release</id>
      <build>
        <plugins>
          <plugin>
            <inherited>true</inherited>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-deploy-plugin</artifactId>
          </plugin>
          <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>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>errorprone</id>
      <build>
        <pluginManagement>
          <plugins>
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-compiler-plugin</artifactId>
              <configuration>
                <showWarnings>true</showWarnings>
                <compilerId>javac-with-errorprone</compilerId>
                <forceJavacCompilerUse>true</forceJavacCompilerUse>
                <compilerArgs>
                  <arg>-XepAllErrorsAsWarnings</arg>
                  <arg>-Xep:OperatorPrecedence:OFF</arg>
                </compilerArgs>
              </configuration>
              <dependencies>
                <dependency>
                  <groupId>org.codehaus.plexus</groupId>
                  <artifactId>plexus-compiler-javac-errorprone</artifactId>
                  <version>2.13.0</version>
                </dependency>
                <!-- override plexus-compiler-javac-errorprone's dependency on
                     Error Prone with the latest version -->
                <dependency>
                  <groupId>com.google.errorprone</groupId>
                  <artifactId>error_prone_core</artifactId>
                  <version>2.23.0</version>
                </dependency>
              </dependencies>
            </plugin>
          </plugins>
        </pluginManagement>
      </build>
    </profile>
  </profiles>

  <dependencies>
    <dependency>
      <groupId>org.eclipse.jetty.toolchain</groupId>
      <artifactId>jetty-test-helper</artifactId>
      <version>6.2</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <scm>
    <connection>scm:git:https://github.com/jetty/jetty.schemas.xhtml.git</connection>
    <developerConnection>scm:git:git@github.com:jetty/jetty.schemas.xhtml.git</developerConnection>
    <url>https://github.com/jetty/jetty.schemas.xhtml</url>
    <tag>jetty-xhtml-schemas-1.4</tag>
  </scm>

  <issueManagement>
    <system>github</system>
    <url>https://github.com/jetty/jetty.schemas.xhtml</url>
  </issueManagement>

  <distributionManagement>
    <repository>
      <id>oss.sonatype.org</id>
      <name>Jetty Staging Repository</name>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
    <snapshotRepository>
      <id>oss.sonatype.org</id>
      <name>Jetty Snapshot Repository</name>
      <url>https://oss.sonatype.org/content/repositories/jetty-snapshots/</url>
    </snapshotRepository>
  </distributionManagement>

  <organization>
    <name>Mort Bay Consulting</name>
    <url>http://www.mortbay.com</url>
  </organization>

  <developers>
    <developer>
      <id>joakime</id>
      <name>Joakim Erdfelt</name>
      <email>joakim@webtide.com</email>
      <organization>Webtide</organization>
      <organizationUrl>https://webtide.com</organizationUrl>
    </developer>
    <developer>
      <id>olamy</id>
      <name>Olivier Lamy</name>
      <email>olamy@webtide.com</email>
      <organization>Webtide</organization>
      <organizationUrl>https://webtide.com</organizationUrl>
    </developer>
  </developers>
</project>

