<?xml version="1.0"?>
<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>de.jflex</groupId>
  <artifactId>jflex-parent</artifactId>
  <name>JFlex parent and aggregator POM</name>
  <version>1.8.2</version>
  <packaging>pom</packaging>
  <url>https://jflex-de.github.io/jflex/</url>
  <description>JFlex parent and aggregator POM</description>
  <licenses>
    <license>
      <name>BSD</name>
      <url>http://opensource.org/licenses/BSD-3-Clause</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <organization>
    <name>JFlex</name>
    <url>http://jflex.de/</url>
  </organization>

  <developers>
    <developer>
      <id>lsf37</id>
      <name>Gerwin Klein</name>
      <email>lsf@jflex.de</email>
      <roles>
        <role>founder</role>
        <role>developer</role>
      </roles>
      <timezone>+10</timezone>
    </developer>
    <developer>
      <id>steve_rowe</id>
      <name>Steve Rowe</name>
      <email>steve_rowe@users.sf.net</email>
      <roles>
        <role>developer</role>
      </roles>
      <timezone>-5</timezone>
    </developer>
    <developer>
      <id>regisd</id>
      <name>Régis Décamps</name>
      <email>decamps@users.sf.net</email>
      <roles>
        <role>developer</role>
      </roles>
      <timezone>+1</timezone>
    </developer>
  </developers>

  <modules>
    <module>cup-maven-plugin</module>
    <module>jflex-unicode-maven-plugin</module>
    <module>jflex</module>
    <module>jflex-maven-plugin</module>
    <module>testsuite</module>
    <module>benchmark</module>
  </modules>
  <mailingLists>
    <mailingList>
      <name>JFlex User List</name>
      <subscribe>https://lists.sourceforge.net/lists/listinfo/jflex-users</subscribe>
      <unsubscribe>https://lists.sourceforge.net/lists/listinfo/jflex-users</unsubscribe>
      <post>jflex-users@lists.sourceforge.net</post>
      <archive>http://sourceforge.net/mailarchive/forum.php?forum_name=jflex-users</archive>
    </mailingList>
    <mailingList>
      <name>JFlex Announcement List</name>
      <subscribe>https://lists.sourceforge.net/lists/listinfo/jflex-announce</subscribe>
      <unsubscribe>https://lists.sourceforge.net/lists/listinfo/jflex-announce</unsubscribe>
      <post>jflex-announce@lists.sourceforge.net</post>
      <archive>http://sourceforge.net/mailarchive/forum.php?forum_name=jflex-announce</archive>
    </mailingList>
    <mailingList>
      <name>JFlex development team members</name>
      <subscribe>https://lists.sourceforge.net/lists/listinfo/jflex-devel</subscribe>
      <unsubscribe>https://lists.sourceforge.net/lists/listinfo/jflex-devel</unsubscribe>
      <archive>http://sourceforge.net/mailarchive/forum.php?forum_name=jflex-devel</archive>
      <post>jflex-devel@lists.sourceforge.net</post>
    </mailingList>
  </mailingLists>

  <properties>
    <cup.version>11b-20160615</cup.version>
    <github.global.server>github</github.global.server>
    <jflex.jdk.version>1.7</jflex.jdk.version>
    <!-- 3.0.x fails to compile flex-maven-plugin https://issues.apache.org/jira/browse/MNG-5346 -->
    <maven.version>3.5.2</maven.version>
    <maven.compiler.source>${jflex.jdk.version}</maven.compiler.source>
    <maven.compiler.target>${jflex.jdk.version}</maven.compiler.target>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>

  <issueManagement>
    <system>Github</system>
    <url>https://github.com/jflex-de/jflex/issues</url>
  </issueManagement>

  <scm>
    <connection>scm:git:git@github.com:jflex-de/jflex.git</connection>
    <developerConnection>scm:git:git@github.com:jflex-de/jflex.git</developerConnection>
    <url>https://github.com/jflex-de/jflex</url>
  </scm>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>com.google.auto.value</groupId>
        <artifactId>auto-value-annotations</artifactId>
        <version>1.7</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>com.google.code.findbugs</groupId>
        <artifactId>jsr305</artifactId>
        <version>3.0.2</version>
      </dependency>
      <dependency>
        <groupId>com.google.guava</groupId>
        <artifactId>guava</artifactId>
        <!-- Release 21.0 requires JDK 1.8 or newer. -->
        <version>20.0</version>
      </dependency>
      <dependency>
        <groupId>com.google.truth</groupId>
        <artifactId>truth</artifactId>
        <version>0.42</version>
      </dependency>
      <dependency>
        <groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>2.6</version>
      </dependency>
      <dependency>
        <groupId>com.github.vbmacher</groupId>
        <artifactId>java-cup</artifactId>
        <version>${cup.version}</version>
      </dependency>
      <dependency>
        <groupId>com.github.vbmacher</groupId>
        <artifactId>java-cup-runtime</artifactId>
        <version>${cup.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.ant</groupId>
        <artifactId>ant</artifactId>
        <version>1.10.5</version>
      </dependency>
      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-plugin-api</artifactId>
        <version>${maven.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-compat</artifactId>
        <version>${maven.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-core</artifactId>
        <version>${maven.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.maven.plugin-tools</groupId>
        <artifactId>maven-plugin-annotations</artifactId>
        <version>3.5.2</version>
      </dependency>
      <dependency>
        <groupId>org.apache.maven.plugin-testing</groupId>
        <artifactId>maven-plugin-testing-harness</artifactId>
        <version>3.3.0</version>
      </dependency>
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.12</version>
      </dependency>
      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-core</artifactId>
        <version>2.23.0</version>
        <scope>test</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.jacoco</groupId>
          <artifactId>jacoco-maven-plugin</artifactId>
          <version>0.8.2</version>
        </plugin>
        <plugin>
          <groupId>de.jflex</groupId>
          <artifactId>cup-maven-plugin</artifactId>
          <version>1.2</version>
        </plugin>
        <plugin>
          <groupId>com.coveo</groupId>
          <artifactId>fmt-maven-plugin</artifactId>
          <version>2.9</version>
        </plugin>
        <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.8.0</version>
        </plugin>
        <plugin>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>2.8.2</version>
        </plugin>
        <plugin>
          <artifactId>maven-clean-plugin</artifactId>
          <version>2.5</version>
        </plugin>
        <plugin>
          <artifactId>maven-enforcer-plugin</artifactId>
          <version>1.4.1</version>
          <executions>
            <execution>
              <id>enforce-java</id>
              <goals>
                <goal>enforce</goal>
              </goals>
              <configuration>
                <rules>
                  <requireJavaVersion>
                    <version>[${jflex.jdk.version},)</version>
                  </requireJavaVersion>
                </rules>
              </configuration>
            </execution>
            <execution>
              <id>enforce-maven</id>
              <goals>
                <goal>enforce</goal>
              </goals>
              <configuration>
                <rules>
                  <requireMavenVersion>
                    <version>${maven.version}</version>
                  </requireMavenVersion>
                </rules>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <artifactId>maven-install-plugin</artifactId>
          <version>2.5</version>
        </plugin>
        <plugin>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>3.1.1</version>
          <configuration>
            <!-- https://bugs.openjdk.java.net/browse/JDK-8212233 -->
            <source>8</source>
            <doclint>none</doclint>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-jar-plugin</artifactId>
          <version>2.4</version>
        </plugin>
        <plugin>
          <artifactId>maven-plugin-plugin</artifactId>
          <version>3.5</version>
        </plugin>
        <plugin>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.5.3</version>
          <configuration>
            <autoVersionSubmodules>true</autoVersionSubmodules>
            <preparationGoals>clean install</preparationGoals>
            <tagBase/>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-resources-plugin</artifactId>
          <version>2.6</version>
        </plugin>
        <plugin>
          <artifactId>maven-shade-plugin</artifactId>
          <version>3.1.0</version>
        </plugin>
        <plugin>
          <artifactId>maven-site-plugin</artifactId>
          <version>3.8.2</version>
        </plugin>
        <plugin>
          <artifactId>maven-source-plugin</artifactId>
          <version>3.0.1</version>
        </plugin>
        <plugin>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>3.0.0-M3</version>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>8</source>
          <target>8</target>
          <annotationProcessorPaths>
            <path>
              <groupId>com.google.auto.value</groupId>
              <artifactId>auto-value</artifactId>
              <version>1.7</version>
            </path>
          </annotationProcessorPaths>
        </configuration>
      </plugin>
    <!-- In Maven 3, the default execution of site:attach-descriptor has been removed from the
     built-in lifecycle bindings for projects with pom packaging. -->
      <plugin>
        <artifactId>maven-site-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-descriptor</id>
            <goals>
              <goal>attach-descriptor</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <topSiteURL>http://jflex-de.github.io/</topSiteURL>
          <stagingDirectory>${project.parent.basedir}/target/maven-staging-site</stagingDirectory>
          <!-- We use github instead -->
          <skip>true</skip>
          <skipDeploy>true</skipDeploy>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
          <execution>
            <id>generate-code-coverage-report</id>
            <phase>test</phase>
            <goals>
              <goal>report</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <reporting>
    <plugins>
      <plugin>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>2.7</version>
        <reportSets>
          <reportSet>
            <reports>
              <report>index</report>
              <report>summary</report>
              <report>plugins</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <configuration>
          <!-- Timestamps create annoying diff on gh-pages -->
          <notimestamp>true</notimestamp>
        </configuration>
      </plugin>
    </plugins>
  </reporting>

  <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>
    <site>
      <id>github.pages</id>
      <name>Github pages</name>
      <url>maven-site/</url>
    </site>
  </distributionManagement>

  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-javadoc-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-source-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.6</version>
            <configuration>
              <keyname>20A847CE6AB7F5F3</keyname>
            </configuration>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>no-doclint</id>
      <activation>
        <property>
          <name>!env.CI</name>
        </property>
      </activation>
      <properties>
        <additionalparam>-Xdoclint:none</additionalparam>
      </properties>
    </profile>
    <profile>
      <id>error-prone</id>
      <activation>
        <jdk>[1.9,)</jdk>
        <property>
          <name>DISABLED</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
              <source>8</source>
              <target>8</target>
              <compilerArgs>
                <arg>-XDcompilePolicy=simple</arg>
                <arg>-Xplugin:ErrorProne -Xep:FallThrough:WARN</arg>
              </compilerArgs>
              <annotationProcessorPaths>
                <path>
                  <groupId>com.google.errorprone</groupId>
                  <artifactId>error_prone_core</artifactId>
                  <version>2.3.3</version>
                </path>
              </annotationProcessorPaths>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>format-java</id>
      <activation>
        <jdk>[1.8,)</jdk>
        <property>
          <name>!env.CI</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>com.coveo</groupId>
            <artifactId>fmt-maven-plugin</artifactId>
            <executions>
              <execution>
                <goals>
                  <goal>format</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>check-format-java</id>
      <activation>
        <jdk>1.8</jdk>
        <property>
          <name>env.CI</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>com.coveo</groupId>
            <artifactId>fmt-maven-plugin</artifactId>
            <executions>
              <execution>
                <goals>
                  <goal>check</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <!-- activate manually if you want to accelerate your build
      mvn -Pfastbuild package
      -->
      <id>fastbuild</id>
      <properties>
        <maven.test.skip>true</maven.test.skip>
        <maven.javadoc.skip>true</maven.javadoc.skip>
      </properties>
      <build>
        <plugins>
          <plugin>
            <groupId>com.coveo</groupId>
            <artifactId>fmt-maven-plugin</artifactId>
            <executions>
              <execution>
                <phase>none</phase>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
