<?xml version="1.0" encoding="UTF-8"?>
<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>

    <name>${project.groupId}:${project.artifactId}</name>
    <groupId>org.asux</groupId>
    <artifactId>language.antlr4</artifactId>

    <version>1.0</version>
    <packaging>jar</packaging>

    <inceptionYear>2019</inceptionYear>
    <description>ANTLR.org based lexer + parser to offer a superior implementation of 'cmd-line arguments' functionality, especially via i18n</description>
    <url>https://ASUX.org</url>

	<parent>
		<groupId>org.asux</groupId>
		<artifactId>MavenCentralRepo-TopLevelPOM</artifactId>
		<version>3.2</version>
		<!-- <relativePath>pom-MavenCentralRepo-TopLevelParent.xml</relativePath> -->
		<!-- EVEN tho' PARENT-POM is in .M2 REPOSITORY... I'm forced to use RELATIVEPATH.  The reason?  The following MAVEN output -->
<!--
[WARNING] Some problems were encountered while building the effective model for org.asux:common:jar:1.0
[WARNING] 'parent.relativePath' of POM org.asux:common:1.0 (/Users/Sarma/Documents/Development/src/org.ASUX/org.ASUX.common/pom.xml) points at org.asux:mvn-shade-uber-jar instead of org.asux:TopLevelPOM, please verify your project structure @ line 17, column 10
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
-->
	</parent>

        <!-- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ -->
        <!-- =========================================================== -->
        <!-- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ -->

	<licenses>
		<license>
			<name>BSD 3-Clause License</name>
			<url>https://opensource.org/licenses/BSD-3-Clause</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

    <developers>
        <developer>
            <name>Udaybhaskar Sarma Seetamraju</name>
            <email>tosarma@gmail.com</email>
            <organization>ASUX.org</organization>
            <organizationUrl>https://ASUX.org</organizationUrl>
            <roles>
                <role>Developer</role>
            </roles>
            <timezone>0</timezone>
        </developer>
    </developers>

	<contributors>
	</contributors>

    <scm>
		<url>https://github.com/org-asux/org.ASUX.language.ANTLR4</url>
		<connection>scm:git:git@github.com:org-asux/org.ASUX.language.ANTLR4.git</connection>
		<developerConnection>scm:git:git@github.com:org-asux/org.ASUX.language.ANTLR4.git</developerConnection>
		<tag>HEAD</tag>
	</scm>

        <!-- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ -->
        <!-- =========================================================== -->
        <!-- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ -->

	<dependencies>
        <!--<dependency>-->
        <!--    <groupId>org.asux</groupId>-->
        <!--    <artifactId>common</artifactId>-->
        <!--</dependency>-->
        <!-- https://tomassetti.me/domain-specific-languages/#textual_languages -->
        <!-- /htdocs/Manuals/GNU-OSS-FOSS/ANTLR_Mega_Tutorial.pdf -->
        <!-- https://mvnrepository.com/artifact/org.antlr/antlr4 -->
        <dependency>
            <groupId>org.antlr</groupId>
            <artifactId>antlr4</artifactId>
            <!-- <version>4.7.2</version>-->
            <!-- <scope>compile</scope> -->
        </dependency>
        <!-- JUNIT5 junit5 -->
        <dependency>
            <groupId>org.junit.vintage</groupId>
            <artifactId>junit-vintage-engine</artifactId>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <!-- <version>5.4.2</version> -->
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <!-- <version>5.4.2</version> -->
            <scope>test</scope>
        </dependency>
    </dependencies>

    <!-- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ -->
    <!-- =========================================================== -->
    <!-- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ -->

    <!--
        To SPECIFICALLY *ONLY* use this plugin, type:
                        mvn antlr4:antlr4
        Once you have written your grammar(s), you just run [mvn package] and the magic happens:
            (1) ANTLR is invoked
            (2) generates the lexer and the parser (java-class-code)
            (3) those generated java-class-code are compiled together with the rest of your code.
        To Repeat: This Plugin compiles the .g4 (grammer) files ahead of the java files.
        Exception: The .g4 grammar does not need to contain the package declaration as stated in the documentation (I do not know why)
    -->
    <build>
        <plugins>
            <plugin>
                <groupId>org.antlr</groupId>
                <artifactId>antlr4-maven-plugin</artifactId>
                <version>4.7.2</version>
                <configuration> <!-- a.k.a. PARAMETERS to the ANTLR plugin. -->
                    <!-- Documentation: Run the command 'mvn antlr4:help -Ddetail=true' -->
                    <!-- Documentation: https://www.antlr.org/api/maven-plugin/latest/antlr4-mojo.html -->
                    <sourceDirectory>${basedir}/src/main/antlr4</sourceDirectory> <!-- (Default: ${basedir}/src/main/antlr4) The directory where the ANTLR grammar files (*.g4) are located. -->
                    <outputDirectory>${project.build.directory}/generated-sources/antlr4</outputDirectory> <!-- (Default: ${project.build.directory}/generated-sources/antlr4)  Specify output directory where the Java files are generated. -->
                    <!-- <outputDirectory>${basedir}/src/main/java/${antlr4.generated-sources.javapackage-as-dirpath}</outputDirectory> -->
                    <outputDirectory>${basedir}/src/main/java</outputDirectory>

                    <treatWarningsAsErrors>true</treatWarningsAsErrors> <!-- (Default: false) Treat warnings as errors. ALTERNATIVELY: User property: antlr4.treatWarningsAsErrors -->
                    <options></options> <!-- A list of grammar options to explicitly specify to the tool. These options are passed to the tool using the -D<option>=<value> syntax. -->
                    <!-- See ANTLR-Tool CommandLine-Options documentation @ https://github.com/antlr/antlr4/blob/master/doc/tool-options.md -->
                    <arguments></arguments>   <!-- A list of additional command line arguments to pass to the ANTLR tool. -->

                    <includes></includes>
                    <excludes></excludes>
                    <inputEncoding>utf-8</inputEncoding> <!-- Alternatively, User property: project.build.sourceEncoding -->
                    <outputEncoding>utf-8</outputEncoding> <!-- specify output file encoding; defaults to source encoding.  ALTERNATIVELY:  User property: project.build.sourceEncoding -->
                    <listener>true</listener> <!-- (Default: true): Generate parse tree listener interface and base class.   ALTERNATIVELY: User property: antlr4.listener -->
                    <visitor>true</visitor> <!-- (Default: false) Generate parse tree visitor interface and base class. ALTERNATIVELY: User property: antlr4.visitor -->
                </configuration>
                <!-- Following EXECUTIONS XML-snippet is REDUNDANT.  My understanding: there is just one goal for this plugin: antlr4 -->
                <!-- <executions>
                    <execution>
                        <goals>
                            <goal>antlr4</goal>
                        </goals>
                        <libDirectory>src/main/antlr4_imports</libDirectory>
                        WARNING: Before you use the above libDirectory TAG, Read more @ https://www.antlr.org/api/maven-plugin/latest/examples/libraries.html
                    </execution>
                </executions> -->
            </plugin>
        </plugins>
    </build>

    <!-- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ -->
    <!-- =========================================================== -->
    <!-- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ -->

    <properties>        <!-- These are to EXTEND what is defined in Parent-POM -->
        <antlr4.visitor>true</antlr4.visitor>
        <antlr4.listener>true</antlr4.listener>
        <!-- <antlr4.generated-sources.javapackage-as-dirpath>org/asux/language</antlr4.generated-sources.javapackage-as-dirpath> -->
    </properties>

</project>

