<?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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <artifactId>mojo-parent</artifactId>
    <groupId>org.codehaus.mojo</groupId>
    <version>18</version>
  </parent>

  <artifactId>javacc-maven-plugin</artifactId>
  <version>2.5</version>
  <packaging>maven-plugin</packaging>

  <name>JavaCC Maven Plugin</name>
  <description>Maven 2 Plugin for processing JavaCC grammar files.</description>
  <url>http://mojo.codehaus.org/javacc-maven-plugin/</url>
  <inceptionYear>2005</inceptionYear>
  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <prerequisites>
    <!--
    NOTE: To satisfy our dependency on plexus-utils we actually need Maven 2.0.6 because all previous versions always
    use plexus-utils 1.1 regardless of the plugin dependency. In practice however, the only benefit of using the newer
    plexus-utils is the fix for PLXUTILS-10 required to solve MJAVACC-35 which is a rather exceptional use-case. All
    other use-cases work fine with the older plexus-utils and hence we can keep the prerequisite on Maven low.
    -->
    <maven>2.0</maven>
  </prerequisites>

  <scm>
    <connection>scm:svn:http://svn.codehaus.org/mojo/tags/javacc-maven-plugin-2.5</connection>
    <developerConnection>scm:svn:https://svn.codehaus.org/mojo/tags/javacc-maven-plugin-2.5</developerConnection>
    <url>http://fisheye.codehaus.org/browse/mojo/tags/javacc-maven-plugin-2.5</url>
  </scm>
  <issueManagement>
    <system>JIRA</system>
    <url>http://jira.codehaus.org/browse/MJAVACC</url>
  </issueManagement>

  <dependencies>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-plugin-api</artifactId>
      <version>2.0.4</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-project</artifactId>
      <version>2.0.4</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-model</artifactId>
      <version>2.0.4</version>
    </dependency>
    <dependency>
      <groupId>net.java.dev.javacc</groupId>
      <artifactId>javacc</artifactId>
      <version>4.1</version>
    </dependency>
    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-utils</artifactId>
      <version>1.5.6</version>
    </dependency>
    <dependency>
      <groupId>edu.ucla.cs.compilers</groupId>
      <artifactId>jtb</artifactId>
      <version>1.3.2</version>
      <!--
      NOTE: Only reflectively accessed to avoid dependency on Java 1.5 for compilation.
      -->
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.reporting</groupId>
      <artifactId>maven-reporting-api</artifactId>
      <version>2.0.4</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.reporting</groupId>
      <artifactId>maven-reporting-impl</artifactId>
      <version>2.0.4</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.doxia</groupId>
      <artifactId>doxia-sink-api</artifactId>
      <version>1.0-alpha-9</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.doxia</groupId>
      <artifactId>doxia-site-renderer</artifactId>
      <version>1.0-alpha-7</version>
      <exclusions>
        <exclusion>
          <groupId>plexus</groupId>
          <artifactId>plexus-utils</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.2</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <profiles>
    <profile>
      <id>integration-tests</id>
      <activation>
        <property>
          <name>maven.test.skip</name>
          <value>!true</value>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-invoker-plugin</artifactId>
            <version>1.3</version>
            <configuration>
              <projectsDirectory>src/it</projectsDirectory>
              <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
              <pomIncludes>
                <pomInclude>*/pom.xml</pomInclude>
              </pomIncludes>
              <postBuildHookScript>verify.bsh</postBuildHookScript>
              <settingsFile>src/it/settings.xml</settingsFile>
              <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
              <debug>true</debug>
            </configuration>
            <executions>
              <execution>
                <id>integration-test</id>
                <goals>
                  <goal>install</goal>
                  <goal>run</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>integration-tests-java14</id>
      <activation>
        <jdk>1.4</jdk>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-invoker-plugin</artifactId>
            <version>1.3</version>
            <configuration>
              <pomExcludes>
                <pomExclude>jtb-*/**</pomExclude>
              </pomExcludes>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
  
</project>
