<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.
-->
<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>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>mojo-parent</artifactId>
    <version>97</version>
  </parent>

  <artifactId>javacc-maven-plugin</artifactId>
  <version>3.3.0</version>
  <packaging>maven-plugin</packaging>

  <name>JavaCC Maven Plugin</name>
  <description>Maven 3 Plugin for processing JavaCC grammar files.</description>
  <url>https://www.mojohaus.org/javacc-maven-plugin/</url>
  <inceptionYear>2005</inceptionYear>
  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <prerequisites>
    <maven>3.9.0</maven>
  </prerequisites>

  <scm>
    <connection>scm:git:https://github.com/mojohaus/javacc-maven-plugin.git</connection>
    <developerConnection>scm:git:ssh://git@github.com/mojohaus/javacc-maven-plugin.git</developerConnection>
    <tag>3.3.0</tag>
    <url>https://github.com/mojohaus/javacc-maven-plugin</url>
  </scm>

  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/mojohaus/javacc-maven-plugin/issues</url>
  </issueManagement>

  <ciManagement>
    <system>GitHub</system>
    <url>https://github.com/mojohaus/javacc-maven-plugin/actions</url>
  </ciManagement>

  <properties>
    <!-- run the ITs in parallel -->
    <invoker.parallelThreads>1C</invoker.parallelThreads>
    <mavenVersion>3.9.16</mavenVersion>
    <minimalMavenBuildVersion>3.9.0</minimalMavenBuildVersion>
    <sitePluginVersion>${maven-site-plugin.version}</sitePluginVersion>
    <skipTests>false</skipTests>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.codehaus.plexus</groupId>
        <artifactId>plexus-utils</artifactId>
        <version>4.1.0</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-plugin-api</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-model</artifactId>
      <version>${mavenVersion}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-core</artifactId>
      <version>${mavenVersion}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.plugin-tools</groupId>
      <artifactId>maven-plugin-annotations</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>net.java.dev.javacc</groupId>
      <artifactId>javacc</artifactId>
      <version>7.0.13</version>
    </dependency>
    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-utils</artifactId>
    </dependency>
    <dependency>
      <groupId>edu.ucla.cs.compilers</groupId>
      <artifactId>jtb</artifactId>
      <version>1.3.2</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.reporting</groupId>
      <artifactId>maven-reporting-api</artifactId>
      <version>4.0.0</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.reporting</groupId>
      <artifactId>maven-reporting-impl</artifactId>
      <version>4.0.0</version>
      <exclusions>
        <exclusion>
          <groupId>org.codehaus.plexus</groupId>
          <artifactId>plexus-container-default</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.doxia</groupId>
      <artifactId>doxia-sink-api</artifactId>
      <version>2.0.0</version>
      <exclusions>
        <exclusion>
          <groupId>org.codehaus.plexus</groupId>
          <artifactId>plexus-container-default</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-invoker-plugin</artifactId>
        <configuration>
          <environmentVariables>
            <!-- each IT is a short-lived JVM: C2 compilation and parallel GC only add startup time -->
            <JAVA_TOOL_OPTIONS>-XX:TieredStopAtLevel=1 -XX:+UseSerialGC</JAVA_TOOL_OPTIONS>
          </environmentVariables>
          <skipInvocation>${skipTests}</skipInvocation>
          <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
          <postBuildHookScript>verify</postBuildHookScript>
          <settingsFile>src/it/settings.xml</settingsFile>
          <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
          <properties>
            <!-- reuse the prefix file the main build cached instead of fetching it again in every fork -->
            <aether.remoteRepositoryFilter.prefixes.basedir>${settings.localRepository}/.meta</aether.remoteRepositoryFilter.prefixes.basedir>
          </properties>
          <debug>true</debug>
        </configuration>
        <executions>
          <execution>
            <id>integration-test</id>
            <goals>
              <goal>install</goal>
              <goal>run</goal>
            </goals>
            <configuration>
              <extraArtifacts>
                <!-- the site plugins of the jjdoc-path-with-spaces fixture: resolved by the main build, so CI caches them -->
                <extraArtifact>org.apache.maven.plugins:maven-site-plugin:${maven-site-plugin.version}:maven-plugin</extraArtifact>
                <extraArtifact>org.apache.maven.plugins:maven-project-info-reports-plugin:${maven-project-info-reports-plugin.version}:maven-plugin</extraArtifact>
              </extraArtifacts>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
