<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.jpmml</groupId>
  <artifactId>pmml-python</artifactId>
  <version>1.3.20</version>
  <name>JPMML Python converter</name>
  <description>JPMML Python to PMML converter</description>
  <url>https://github.com/jpmml/jpmml-python</url>
  <licenses>
    <license>
      <name>GNU Affero General Public License (AGPL) version 3.0</name>
      <url>http://www.gnu.org/licenses/agpl-3.0.html</url>
    </license>
  </licenses>
  <developers>
    <developer>
      <id>villu.ruusmann</id>
      <name>Villu Ruusmann</name>
    </developer>
  </developers>
  <scm child.scm.connection.inherit.append.path="false" child.scm.developerConnection.inherit.append.path="false" child.scm.url.inherit.append.path="false">
    <connection>scm:git:git@github.com:jpmml/jpmml-python.git</connection>
    <developerConnection>scm:git:git@github.com:jpmml/jpmml-python.git</developerConnection>
    <tag>1.3.20</tag>
    <url>https://github.com/jpmml/jpmml-python</url>
  </scm>
  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/jpmml/jpmml-python/issues</url>
  </issueManagement>
  <dependencies>
    <dependency>
      <groupId>org.jpmml</groupId>
      <artifactId>pmml-converter</artifactId>
      <version>1.6.10</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>net.razorvine</groupId>
      <artifactId>pickle</artifactId>
      <version>1.5</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>net.razorvine</groupId>
      <artifactId>serpent</artifactId>
      <version>1.40</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.jpmml</groupId>
      <artifactId>pmml-evaluator</artifactId>
      <version>1.7.7</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>failureaccess</artifactId>
      <version>1.0.3</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-api</artifactId>
      <version>5.14.3</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifestEntries>
              <Implementation-Title>JPMML-Python library</Implementation-Title>
              <Implementation-Version>${project.version}</Implementation-Version>
            </manifestEntries>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <version>3.2.0</version>
        <executions>
          <execution>
            <id>generate-grammar</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <target>
                <loadfile property="python.tokens.content" srcFile="src/main/javacc/python.tokens" />
                <loadfile property="python.productions.content" srcFile="src/main/javacc/python.productions" />
                <copy todir="${project.build.directory}/transformed-grammar">
                  <fileset dir="src/main/javacc/">
                    <include name="*.jj" />
                  </fileset>
                  <filterset>
                    <filter value="${python.tokens.content}" token="python.tokens" />
                    <filter value="${python.productions.content}" token="python.productions" />
                  </filterset>
                </copy>
              </target>
            </configuration>
          </execution>
          <execution>
            <id>process-sources</id>
            <phase>process-sources</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <target>
                <delete>
                  <fileset dir="${basedir}/target/generated-sources/javacc/org/jpmml/python/">
                    <include name="**/*TranslatorConstants.java" />
                    <include name="**/FunctionDefParserConstants.java" />
                  </fileset>
                </delete>
                <replaceregexp match="(Expression|Predicate)TranslatorConstants" replace="PythonParserConstants" byline="true">
                  <fileset dir="${basedir}/target/generated-sources/javacc/org/jpmml/python/">
                    <filename name="*Translator.java" />
                  </fileset>
                </replaceregexp>
                <replaceregexp match="FunctionDefParserConstants" replace="PythonParserConstants" byline="true">
                  <fileset dir="${basedir}/target/generated-sources/javacc/org/jpmml/python/">
                    <filename name="FunctionDefParser.java" />
                  </fileset>
                </replaceregexp>
                <replaceregexp match="(Expression|Predicate)TranslatorTokenManager" replace="PythonParserTokenManager" byline="true">
                  <fileset dir="${basedir}/target/generated-sources/javacc/org/jpmml/python/">
                    <filename name="*Translator.java" />
                  </fileset>
                </replaceregexp>
                <replaceregexp match="FunctionDefParserTokenManager" replace="PythonParserTokenManager" byline="true">
                  <fileset dir="${basedir}/target/generated-sources/javacc/org/jpmml/python/">
                    <filename name="FunctionDefParser.java" />
                  </fileset>
                </replaceregexp>
              </target>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>javacc-maven-plugin</artifactId>
        <version>3.2.0</version>
        <executions>
          <execution>
            <phase>generate-sources</phase>
            <goals>
              <goal>javacc</goal>
            </goals>
            <configuration>
              <sourceDirectory>${project.build.directory}/transformed-grammar</sourceDirectory>
            </configuration>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>net.java.dev.javacc</groupId>
            <artifactId>javacc</artifactId>
            <version>7.0.13</version>
          </dependency>
        </dependencies>
      </plugin>
    </plugins>
  </build>
</project>
