<?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>
  <artifactId>jflex</artifactId>
  <parent>
    <groupId>de.jflex</groupId>
    <artifactId>jflex-parent</artifactId>
    <version>1.8.2</version>
    <relativePath>parent.xml</relativePath>
  </parent>
  <name>JFlex</name>
  <inceptionYear>1998</inceptionYear>
  <description>
    JFlex is a lexical analyzer generator (also known as
    scanner generator) for Java™, written in Java.
  </description>
  <licenses>
    <license>
      <name>BSD</name>
      <url>http://opensource.org/licenses/BSD-3-Clause</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <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>
  <dependencies>
    <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>
    </dependency>
    <dependency>
      <groupId>com.google.auto.value</groupId>
      <artifactId>auto-value-annotations</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.google.truth</groupId>
      <artifactId>truth</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.pholser</groupId>
      <artifactId>junit-quickcheck-core</artifactId>
      <version>0.9</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.pholser</groupId>
      <artifactId>junit-quickcheck-generators</artifactId>
      <version>0.9</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-simple</artifactId>
      <version>1.7.28</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <includes>
            <include>**/*Test.java</include>
            <include>**/*Tests.java</include>
            <include>**/*Quickcheck.java</include>
          </includes>
        </configuration>
      </plugin>
      <plugin>
        <groupId>de.jflex</groupId>
        <artifactId>jflex-maven-plugin</artifactId>
        <!-- bootstrap with previous version -->
        <version>1.8.1</version>
        <executions>
          <execution>
            <goals>
              <goal>generate</goal>
            </goals>
            <configuration>
              <skeleton>src/main/jflex/skeleton.nested</skeleton>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>de.jflex</groupId>
        <artifactId>cup-maven-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>generate</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <!--interface="true" locations="false" parser="LexParse"-->
          <symbolInterface>true</symbolInterface>
          <parserName>LexParse</parserName>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifest>
              <mainClass>jflex.Main</mainClass>
              <packageName>jflex</packageName>
            </manifest>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-clean-plugin</artifactId>
        <configuration>
          <filesets>
            <fileset>
              <directory>lib</directory>
              <includes>
                <include>**/${project.artifactId}-${project.version}.jar</include>
              </includes>
            </fileset>
          </filesets>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-shade-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <finalName>${project.artifactId}-full-${project.version}</finalName>
              <artifactSet>
                <includes>
                  <include>com.github.vbmacher:java-cup-runtime</include>
                </includes>
              </artifactSet>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-resources-plugin</artifactId>
        <executions>
          <execution>
            <id>copy-jar-to-lib</id>
            <phase>install</phase>
            <goals>
              <goal>copy-resources</goal>
            </goals>
            <configuration>
              <outputDirectory>${basedir}/lib</outputDirectory>
              <resources>
                <resource>
                  <directory>target</directory>
                  <includes>
                    <include>${project.artifactId}-full-${project.version}.jar</include>
                  </includes>
                </resource>
              </resources>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
            <configuration>
              <excludes>
                <!-- The Unicode_x_y.java files were actually generated by the
                     jflex-unicode-maven-plugin. Don't bother running test coverage on them.
                -->
                <exclude>jflex/unicode/data/*.java</exclude>
              </excludes>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
    <pluginManagement>
      <plugins>
        <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
        <plugin>
          <groupId>org.eclipse.m2e</groupId>
          <artifactId>lifecycle-mapping</artifactId>
          <version>1.0.0</version>
          <configuration>
            <lifecycleMappingMetadata>
              <pluginExecutions>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>de.jflex</groupId>
                    <artifactId>jflex-maven-plugin</artifactId>
                    <versionRange>[1.6.0,)</versionRange>
                    <goals>
                      <goal>generate</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore/>
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <profiles>
    <profile>
      <id>generate-unicode-properties</id>
      <build>
        <plugins>
          <plugin>
            <groupId>de.jflex</groupId>
            <artifactId>jflex-unicode-maven-plugin</artifactId>
            <version>${project.version}</version>
            <executions>
              <execution>
                <id>generate</id>
                <phase>generate-sources</phase>
                <goals>
                  <goal>generate-unicode-properties</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
