<?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>
    <parent>
        <groupId>br.com.porcelli.parser</groupId>
        <artifactId>plsql</artifactId>
        <version>1.0-SNAPSHOT</version>
    </parent>
    <groupId>br.com.porcelli.parser.plsql</groupId>
    <artifactId>lexer-parser</artifactId>
    <dependencies>
        <dependency>
            <groupId>org.antlr</groupId>
            <artifactId>antlr</artifactId>
        </dependency>
        <dependency>
            <groupId>org.antlr</groupId>
            <artifactId>antlr-runtime</artifactId>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>add-source</goal>
                        </goals>
                        <configuration>
                            <sources>
                                <source>${project.build.directory}/generated-sources/antlr3</source>
                            </sources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <version>1.1</version>
                <executions>
                    <execution>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>exec</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <executable>java</executable>
                    <arguments>
                        <argument>-Xmx1g</argument>
                        <argument>-classpath</argument>
                        <classpath/>
                        <argument>org.antlr.Tool</argument>
                        <argument>-o</argument>
                        <argument>${project.build.directory}/generated-sources/antlr3/br/com/porcelli/parser/plsql/
                        </argument>
			<argument>-Xmultithreaded</argument>
                        <argument>-lib</argument>
                        <argument>${project.basedir}/src/main/antlr3/br/com/porcelli/parser/plsql/imports/</argument>
                        <argument>${project.basedir}/src/main/antlr3/br/com/porcelli/parser/plsql/PLSQLLexer.g
                        </argument>
                        <argument>${project.basedir}/src/main/antlr3/br/com/porcelli/parser/plsql/PLSQLParser.g
                        </argument>
                    </arguments>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.antlr</groupId>
                <artifactId>maven-gunit-plugin</artifactId>
                <version>3.2</version>
                <executions>
                    <execution>
                        <id>maven-gunit-plugin</id>
                        <phase>test</phase>
                        <goals>
                            <goal>gunit</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
