<?xml version="1.0"?>
<!--

    Copyright 2017-2025 Philip Helger, pgcc@helger.com

    Copyright 2011 Google Inc. All Rights Reserved.
    Author: sreeni@google.com (Sreeni Viswanadha)

    Copyright (c) 2006, Sun Microsystems, Inc.
    All rights reserved.

    Redistribution and use in source and binary forms, with or without
    modification, are permitted provided that the following conditions are met:

        * Redistributions of source code must retain the above copyright notice,
          this list of conditions and the following disclaimer.
        * Redistributions in binary form must reproduce the above copyright
          notice, this list of conditions and the following disclaimer in the
          documentation and/or other materials provided with the distribution.
        * Neither the name of the Sun Microsystems, Inc. nor the names of its
          contributors may be used to endorse or promote products derived from
          this software without specific prior written permission.

    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
    AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
    LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
    CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
    SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
    INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
    CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
    ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
    THE POSSIBILITY OF SUCH DAMAGE.

-->
<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>com.helger</groupId>
    <artifactId>parent-pom</artifactId>
    <version>3.0.2</version>
  </parent>
  <artifactId>parser-generator-cc</artifactId>
  <packaging>bundle</packaging>
  <name>parser-generator-cc</name>
  <version>2.0.0</version>

  <description>ParserGenerator is a parser/scanner generator for java (fork of JavaCC 7.0.3)</description>
  <url>https://github.com/phax/ParserGeneratorCC</url>
  <inceptionYear>2017</inceptionYear>

  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/phax/ParserGeneratorCC/issues</url>
  </issueManagement>
  
  <organization>
    <name>Philip Helger</name>
    <url>http://www.helger.com</url>
  </organization>

  <scm>
    <connection>scm:git:https://github.com/phax/ParserGeneratorCC.git</connection>
    <developerConnection>scm:git:https://github.com/phax/ParserGeneratorCC.git</developerConnection>
    <url>http://github.com/phax/ParserGeneratorCC</url>
    <tag>parser-generator-cc-2.0.0</tag>
  </scm>

  <developers>
    <developer>
      <id>philip</id>
      <name>Philip Helger</name>
      <email>ph(at)helger.com</email>
      <url>http://www.helger.com</url>
    </developer>
  </developers>

  <contributors>
    <contributor>
      <name>Sreenivasa Viswanadha</name>
      <email>sreeni At dev.java.net</email>
      <roles>
        <role>Owner</role>
      </roles>
      <timezone>0</timezone>
      <organization>javacc.org</organization>
      <organizationUrl>https://javacc.org</organizationUrl>
    </contributor>

    <contributor>
      <name>Chris Ainsley</name>
      <email>ainsleyc At dev.java.net</email>
      <roles>
        <role>Developer</role>
      </roles>
      <timezone>0</timezone>
      <organization>java.net</organization>
      <organizationUrl>http://www.java.net/</organizationUrl>
    </contributor>

    <contributor>
      <name>Tim Pizey</name>
      <email>timp AT paneris.org</email>
      <roles>
        <role>Maven maven</role>
        <role>Developer</role>
      </roles>
      <timezone>0</timezone>
      <url>http://paneris.org/~timp</url>
      <organization>Context Computing</organization>
      <organizationUrl>http://www.context-computing.co.uk/</organizationUrl>
    </contributor>

    <contributor>
      <name>Francis ANDRE</name>
      <email>zosrothko AT orange.fr</email>
      <roles>
        <role>Developer</role>
      </roles>
      <timezone>0</timezone>
      <url>http://www.kampbell.net</url>
      <organization>Kampbell</organization>
      <organizationUrl>https://github.com/Kampbell/</organizationUrl>
    </contributor>
  </contributors>
  
  <licenses>
    <license>
      <name>Berkeley Software Distribution (BSD) License</name>
      <url>http://www.opensource.org/licenses/bsd-license.html</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>com.helger.commons</groupId>
        <artifactId>ph-commons-parent-pom</artifactId>
        <version>12.0.1</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>
  
  <dependencies>
    <dependency>
      <groupId>com.helger.commons</groupId>
      <artifactId>ph-base</artifactId>
    </dependency>
    <dependency>
      <groupId>com.helger.commons</groupId>
      <artifactId>ph-security</artifactId>
    </dependency>
    <dependency>
      <groupId>com.helger.commons</groupId>
      <artifactId>ph-xml</artifactId>
    </dependency>
    
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-simple</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.github.javaparser</groupId>
      <artifactId>javaparser-core</artifactId>
      <version>3.27.0</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <resources>
      <!-- Don't specify the targetPath because this leads to a broken JAR file 
        in combination with the bundle plugin (absolute file paths in ZIP file) -->
      <resource>
        <directory>${basedir}/src/main/resources</directory>
        <filtering>true</filtering>
        <includes>
          <include>**/*.properties</include>
        </includes>
      </resource>
      <resource>
        <directory>${basedir}/src/main/resources</directory>
        <filtering>false</filtering>
        <excludes>
          <exclude>**/*.properties</exclude>
        </excludes>
      </resource>
    </resources>

    <plugins>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <extensions>true</extensions>
        <configuration>
          <instructions>
            <Automatic-Module-Name>com.helger.pgcc</Automatic-Module-Name>
            <Export-Package>com.helger.pgcc.*</Export-Package>
            <Import-Package>!javax.annotation.*,*</Import-Package>
          </instructions>
        </configuration>
      </plugin>
      <plugin>
        <groupId>com.helger.maven</groupId>
        <artifactId>ph-javacc-maven-plugin</artifactId>
        <version>4.1.5</version>
        <executions>
          <execution>
            <id>phase1</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>javacc</goal>
            </goals>
            <configuration>
              <sourceDirectory>src/main/javacc</sourceDirectory>
              <includes>
                <include>JavaCC.jj</include>
                <include>ConditionParser.jj</include>
              </includes>
            </configuration>
          </execution>
          <execution>
            <id>phase2</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>jjtree-javacc</goal>
            </goals>
            <configuration>
              <sourceDirectory>src/main/jjtree</sourceDirectory>
              <includes>
                <include>JJTree.jjt</include>
              </includes>
            </configuration>
          </execution>
        </executions>
        <configuration>
          <jdkVersion>1.8</jdkVersion>
          <javaTemplateType>modern</javaTemplateType>
        </configuration>
      </plugin>
      <plugin>
        <groupId>com.mycila</groupId>
        <artifactId>license-maven-plugin</artifactId>
        <configuration>
          <excludes>
            <exclude>**/*.txt</exclude>
            <exclude>**/*.template</exclude>
            <exclude>docs/*</exclude>
            <exclude>examples/*</exclude>
            <exclude>grammars/*</exclude>
            <exclude>www/doc/JavaCC.html</exclude>
          </excludes>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <configuration>
          <source>17</source>
          <sourcepath>
            ${project.build.sourceDirectory}:${project.build.directory}/generated-sources/javacc:${project.build.directory}/generated-sources/jjtree
          </sourcepath>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
        <configuration>
          <siteDirectory>www</siteDirectory>
          <locales>en</locales>
        </configuration>
      </plugin>
    </plugins>
  </reporting>
</project>
