<!--
  ~ Copyright (c) 2012 The ANTLR Project. All rights reserved.
  ~ Use of this file is governed by the BSD-3-Clause license that
  ~ can be found in the LICENSE.txt file in the project root.
  -->

<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">

    <parent>
        <groupId>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>9</version>
    </parent>

    <modelVersion>4.0.0</modelVersion>
    <groupId>me.sunlan</groupId>
    <artifactId>antlr4-master</artifactId>
    <version>4.13.1.2</version>
    <packaging>pom</packaging>

    <name>ANTLR 4</name>
    <description>ANTLR 4 Master Build POM</description>
    <url>https://github.com/daniellansun/antlr4</url>
    <inceptionYear>1992</inceptionYear>
    <organization>
        <!--
          The organization name is used in the manifests of the Jar files. Set to Daniel Sun for this custom
          build.
        -->
        <name>Daniel Sun</name>
        <url>https://sunlan.me</url>
    </organization>

    <licenses>
        <license>
            <name>The BSD License</name>
            <url>http://www.antlr.org/license.html</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>

        <developer>
            <name>Terence Parr</name>
            <url>http://parrt.cs.usfca.edu</url>
            <roles>
                <role>Project lead - ANTLR</role>
            </roles>
        </developer>

        <developer>
            <name>Sam Harwell</name>
            <url>http://tunnelvisionlabs.com</url>
            <roles>
                <role>Developer</role>
            </roles>
        </developer>

        <developer>
            <name>Jim Idle</name>
            <email>jimi@idle.ws</email>
            <url>http://www.linkedin.com/in/jimidle</url>
            <roles>
                <role>Developer - Maven Plugin</role>
            </roles>
        </developer>

        <developer>
            <name>Daniel Sun</name>
            <url>https://sunlan.me</url>
            <roles>
                <role>Developer</role>
            </roles>
        </developer>
    </developers>

    <modules>
        <module>runtime/Java</module>
        <module>runtime/JavaAnnotations</module>
        <module>tool</module>
        <module>antlr4-maven-plugin</module>
        <module>antlr4-testgen-maven-plugin</module>
        <module>runtime-testsuite</module>
        <module>perf-testsuite</module>
    </modules>

    <properties>
        <maven.javadoc.failOnError>false</maven.javadoc.failOnError>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <java5.home>${env.JAVA5_HOME}</java5.home>
        <java6.home>${env.JAVA6_HOME}</java6.home>
        <bootclasspath.java5>${java5.home}/lib/rt.jar</bootclasspath.java5>
        <bootclasspath.java6>${java6.home}/lib/rt.jar</bootclasspath.java6>
        <bootclasspath.compile>${bootclasspath.java6}</bootclasspath.compile>
        <bootclasspath.testCompile>${bootclasspath.java6}</bootclasspath.testCompile>
        <antlr.testinprocess>true</antlr.testinprocess>

        <nexus.url>https://oss.sonatype.org</nexus.url>
        <project.repository>daniellansun/antlr4</project.repository>
        <repository.url>git@github.com:${project.repository}.git</repository.url>
    </properties>

    <mailingLists>
        <mailingList>
            <name>antlr-discussion</name>
            <archive>https://groups.google.com/forum/?fromgroups#!forum/antlr-discussion</archive>
        </mailingList>
    </mailingLists>

    <issueManagement>
        <system>GitHub Issues</system>
        <url>https://github.com/antlr/antlr4/issues</url>
    </issueManagement>

    <scm>
        <url>https://github.com/${project.repository}/tree/opt</url>
        <connection>scm:git:https://github.com/${project.repository}.git</connection>
        <developerConnection>scm:git:${repository.url}</developerConnection>
      <tag>HEAD</tag>
  </scm>

    <profiles>
        <profile>
            <id>sonatype-oss-release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>default-compile</id>
                                <configuration>
                                    <compilerArgs>
                                        <arg>-Xlint</arg>
                                        <arg>-Xlint:-serial</arg>
                                        <arg>-bootclasspath</arg>
                                        <arg>${bootclasspath.compile}</arg>
                                    </compilerArgs>
                                </configuration>
                            </execution>
                            <execution>
                                <id>default-testCompile</id>
                                <configuration>
                                    <compilerArgs>
                                        <arg>-Xlint</arg>
                                        <arg>-Xlint:-serial</arg>
                                        <arg>-bootclasspath</arg>
                                        <arg>${bootclasspath.testCompile}</arg>
                                    </compilerArgs>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>jdk6-bnd</id>
            <activation>
                <jdk>1.6</jdk>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.felix</groupId>
                        <artifactId>maven-bundle-plugin</artifactId>
                        <version>2.5.4</version>
                        <extensions>true</extensions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>jdk7plus-bnd</id>
            <activation>
                <jdk>!1.6</jdk>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.felix</groupId>
                        <artifactId>maven-bundle-plugin</artifactId>
                        <version>3.0.1</version>
                        <extensions>true</extensions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.10.1</version>
                <configuration>
                    <showWarnings>true</showWarnings>
                    <showDeprecation>true</showDeprecation>
                    <source>1.8</source>
                    <target>1.8</target>
                    <compilerArgs>
                        <arg>-Xlint</arg>
                        <arg>-Xlint:-serial</arg>
                    </compilerArgs>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.3.0</version>
                <configuration>
                    <archive>
                        <manifest>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.22.2</version>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <!-- override the version inherited from the parent -->
                <version>3.2.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <configuration>
                            <attach>true</attach>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <!-- override the version inherited from the parent -->
                <version>2.10.4</version>
                <configuration>
                    <quiet>true</quiet>
                    <locale>en_US</locale>
                    <additionalparam>-Xdoclint:none</additionalparam>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <configuration>
                            <attach>true</attach>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <!-- override the version inherited from the parent -->
                <version>3.0.1</version>
                <configuration>
                    <useAgent>true</useAgent>
                </configuration>
                <executions>
                    <execution>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                        <configuration>
                            <gpgArguments>
                                <arg>--pinentry-mode</arg>
                                <arg>loopback</arg>
                            </gpgArguments>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <!-- override the version inherited from the parent -->
                <version>2.5.3</version>
                <configuration>
                    <arguments>-Psonatype-oss-release ${release.arguments}</arguments>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <tagNameFormat>@{project.version}-opt</tagNameFormat>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>1.6.13</version>
                <extensions>true</extensions>
                <configuration>
                    <serverId>sonatype-nexus-staging</serverId>
                    <nexusUrl>${nexus.url}</nexusUrl>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
