<?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-scala</artifactId>
  <parent>
    <groupId>edu.umass.cs.iesl</groupId>
    <artifactId>jflex-scala-parent</artifactId>
    <!--<version>1.7.0-SNAPSHOT</version>-->
    <version>1.6.1</version>
    <relativePath>../pom.xml</relativePath>
  </parent>
  <name>JFlex-scala</name>
  <url>https://github.com/strubell/jflex-scala</url>
  <inceptionYear>2015</inceptionYear>
  <description>
    This is a fork of JFlex, a lexical analyzer generator (also known as
    scanner generator) for Java™, written in Java. This version
    can also output Scala.
  </description>
  <licenses>
    <license>
      <name>BSD</name>
      <url>http://opensource.org/licenses/BSD-3-Clause</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <developers>
    <developer>
      <id>strubell</id>
      <name>Emma Strubell</name>
      <email>strubell@cs.umass.edu</email>
      <roles>
        <role>developer</role>
      </roles>
      <timezone>-4</timezone>
    </developer>
  </developers>
  <dependencies>
    <dependency>
      <groupId>org.apache.ant</groupId>
      <artifactId>ant</artifactId>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <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>
          </includes>
        </configuration>
      </plugin>
      <plugin>
        <groupId>de.jflex</groupId>
        <artifactId>jflex-maven-plugin</artifactId>
        <version>1.6.1</version>
        <executions>
          <execution>
            <goals>
              <goal>generate</goal>
            </goals>
            <configuration>
              <skeleton>src/main/jflex/skeleton.nested</skeleton>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <id>cup-generate-parser</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <target name="cup">
                <property name="cup.version" value="11b"/>
                <property name="cup.jar" value="lib/java-cup-${cup.version}.jar"/>
                <property name="cup.output.dir" location="target/generated-sources/jflex/"/>
                <property name="cup.file" location="src/main/cup/LexParse.cup"/>
                <mkdir dir="${cup.output.dir}"/>
                <echo message="Generating LexParse.java from ${cup.file}"/>
                <taskdef classname="java_cup.anttask.CUPTask" name="cup" classpath="${cup.jar}"/>
                <cup srcfile="${cup.file}" destdir="${cup.output.dir}" interface="true" locations="false" parser="LexParse"/>
              </target>
            </configuration>
          </execution>
          <execution>
            <id>copy-jar-to-lib</id>
            <phase>install</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <target name="copy">
                <copy file="${project.build.directory}/${project.artifactId}-${project.version}.jar" todir="lib"/>
              </target>
            </configuration>
          </execution>
        </executions>
      </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-javadoc-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-clean-plugin</artifactId>
        <version>2.5</version>
        <configuration>
          <filesets>
            <fileset>
              <directory>lib</directory>
              <includes>
                <include>**/${project.artifactId}-${project.version}.jar</include>
              </includes>
            </fileset>
          </filesets>
        </configuration>
      </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>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-antrun-plugin</artifactId>
                    <versionRange>[1.7,)</versionRange>
                    <goals>
                      <goal>run</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <execute/>
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>
  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>2.7</version>
        <reportSets>
          <reportSet>
            <reports>
              <report>index</report>
              <report>dependencies</report>
              <report>project-team</report>
              <report>issue-tracking</report>
              <report>license</report>
              <report>scm</report>
              <report>summary</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-pmd-plugin</artifactId>
        <version>3.0.1</version>
        <configuration>
          <targetJdk>1.5</targetJdk>
          <rulesets>
            <ruleset>${basedir}/src/main/config/pmd/ruleset.xml</ruleset>
          </rulesets>
          <format>xml</format>
          <linkXRef>true</linkXRef>
          <minimumTokens>100</minimumTokens>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>taglist-maven-plugin</artifactId>
        <version>2.4</version>
        <configuration>
          <tags>
            <tag>TODO</tag>
            <tag>FIXME</tag>
            <tag>@todo</tag>
            <tag>@deprecated</tag>
          </tags>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-report-plugin</artifactId>
        <version>2.16</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jxr-plugin</artifactId>
        <version>2.3</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.10.1</version>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>findbugs-maven-plugin</artifactId>
        <version>3.0.0</version>
        <configuration>
          <xmlOutput>true</xmlOutput>
          <threshold>Normal</threshold>
          <effort>Default</effort>
          <outputDirectory>target/findbugs</outputDirectory>
          <excludeFilterFile>
            findbugs-exclude.xml
          </excludeFilterFile>
          <visitors>FindDeadLocalStores,UnreadFields</visitors>
          <onlyAnalyze>de.jflex.*</onlyAnalyze>
          <debug>true</debug>
          <relaxed>true</relaxed>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>jdepend-maven-plugin</artifactId>
        <version>2.0-beta-2</version>
      </plugin>
    </plugins>
  </reporting>
  <profiles>
    <profile>
      <id>generate-unicode-properties</id>
      <build>
        <plugins>
          <plugin>
            <groupId>de.jflex</groupId>
            <artifactId>jflex-unicode-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>generate</id>
                <phase>generate-sources</phase>
                <goals>
                  <goal>generate-unicode-properties</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>
</project>
