<?xml version="1.0" encoding="UTF-8"?>
<!-- =======================================================================
        Maven Project Configuration File                                        

        The Geotools Project                                                    
            http://www.geotools.org/                                            

        Version: $Id$
     ======================================================================= -->
  <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>
    <groupId>org.geotools</groupId>
    <artifactId>library</artifactId>
    <version>23.5</version>
  </parent>


  <!-- =========================================================== -->
  <!--     Module Description                                      -->
  <!-- =========================================================== -->
  <groupId>org.geotools</groupId>
  <artifactId>gt-cql</artifactId>
  <packaging>jar</packaging>
  <name>OGC CQL to Filter parser</name>

  <description>
    A parser that takes a Constraint Query Language input string and produces
    an equivalent org.opengis.filter.Filter.
  </description>

  <properties>
    <moduleIdentifier>org.geotools.text.cql</moduleIdentifier>
  </properties>

  <licenses>
    <license>
      <name>Lesser General Public License (LGPL)</name>
      <url>http://www.gnu.org/copyleft/lesser.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>


  <!-- =========================================================== -->
  <!--     Developers and Contributors                             -->
  <!-- =========================================================== -->
  <developers>
    <developer>
      <name>Ian Schneider</name>
      <id>ians</id>
      <roles>
        <role>Original Developer</role>
      </roles>
    </developer>
    <developer>
      <name>Mauricio Pazos</name>
      <id>mauricio.pazos</id>
      <email>mauricio.pazos@axios.es</email>
      <organization>Axios</organization>
      <roles>
        <role>Module Maintainer</role>
        <role>Java Developer</role>
      </roles>
    </developer>
    <developer>
      <name>Gabriel Roldan</name>
      <id>groldan</id>
      <email>groldan@users.sourceforge.net</email>
      <roles>
        <role>Java Developer</role>
      </roles>
    </developer>
  </developers>


  <!-- =========================================================== -->
  <!--     Dependency Management                                   -->
  <!-- =========================================================== -->
  <dependencies>
    <dependency>
      <groupId>org.geotools</groupId>
      <artifactId>gt-main</artifactId>
      <version>${project.version}</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.geotools</groupId>
      <artifactId>gt-xml</artifactId>
      <version>${project.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.geotools</groupId>
      <artifactId>gt-epsg-wkt</artifactId>
      <version>${project.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>


  <!-- ==================================================== -->
  <!--     Compilation (including non-standard plugins)     -->
  <!-- ==================================================== -->
  <build>
    <plugins>
 
      <plugin>
        <groupId>org.geotools.maven</groupId>
        <artifactId>jjtree-javacc</artifactId>
        <version>${project.version}</version>
			
    		<configuration>
         		<nodePackage>org.geotools.filter.text.generated.parsers</nodePackage>
     			<nodeDirectory>${basedir}/modified-src</nodeDirectory>
     			<sourceDirectory>${basedir}/src/main/jjtree</sourceDirectory>
    		</configuration>

        <executions>
          <execution>
            <goals>
              <goal>generate</goal>
            </goals>

          </execution>
          
        </executions>

      </plugin>
	    <plugin>
	        <groupId>org.codehaus.mojo</groupId>
	        <artifactId>build-helper-maven-plugin</artifactId>
	        <executions>
	            <execution>
	                <id>add-source</id>
	                <phase>generate-sources</phase>
	                <goals>
	                    <goal>add-source</goal>
	                </goals>
	                <configuration>
	                    <sources>
	                        <source>${project.build.directory}/generated-sources/jjtree-javacc</source>
	                    </sources>
	                </configuration>
	            </execution>
	        </executions>
        </plugin>      
    </plugins>

  </build>

    <profiles>
        <profile>
            <id>errorprone</id>
            <activation>
                <property>
                    <name>qa</name>
                </property>
                <jdk>(1.8,)</jdk>
            </activation>
            <properties>
                <!-- 
                  tried hard to have exclude generated sources based on the following but could not succeed.
                  https://stackoverflow.com/questions/39994647/maven-3-how-to-exclude-generated-sources-from-xlint-check
                  Disabling linting for java 11 in this module instead
                -->
                <lint>none</lint>
            </properties>
        </profile>
    </profiles>

</project>
