<!--
  ~ Copyright (c) 2012-2016 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">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.antlr</groupId>
    <artifactId>antlr4-master</artifactId>
    <version>4.6</version>
  </parent>
  <artifactId>antlr4</artifactId>
  <name>ANTLR 4 Tool</name>
  <url>http://www.antlr.org</url>
  <description>The ANTLR 4 grammar compiler.</description>

	<dependencies>
		<dependency>
			<groupId>org.antlr</groupId>
			<artifactId>antlr4-runtime</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>org.antlr</groupId>
			<artifactId>antlr-runtime</artifactId>
			<version>3.5.2</version>
		</dependency>
		<dependency>
			<groupId>org.antlr</groupId>
			<artifactId>ST4</artifactId>
			<version>4.0.8</version>
		</dependency>
		<dependency>
			<groupId>org.abego.treelayout</groupId>
			<artifactId>org.abego.treelayout.core</artifactId>
			<version>1.0.3</version>
		</dependency>
		<dependency>
			<groupId>org.glassfish</groupId>
			<artifactId>javax.json</artifactId>
			<version>1.0.4</version>
		</dependency>
	</dependencies>

  <build>
		<sourceDirectory>src</sourceDirectory>
		<testResources>
			<testResource>
				<directory>test</directory>
			</testResource>
		</testResources>
		<plugins>
			<plugin> <!-- create src jar -->
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<executions>
					<execution>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin> <!-- create javadoc jar -->
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>2.10.4</version>
				<configuration>
					<javadocVersion>1.7</javadocVersion>
					<failOnError>false</failOnError>
				</configuration>
				<executions>
					<execution>
						<phase>deploy</phase>
						<goals>
							<goal>javadoc</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin> <!-- this makes a fat jar with all dependencies -->
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-shade-plugin</artifactId>
				<version>2.3</version>
				<executions>
					<execution>
            <phase>package</phase>
            <configuration>
							<minimizeJar>false</minimizeJar>
							<createDependencyReducedPom>false</createDependencyReducedPom>
							<shadedArtifactAttached>true</shadedArtifactAttached>
              <shadedClassifierName>complete</shadedClassifierName>
            </configuration>
            <goals>
              <goal>shade</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <!-- can't get this to add bundle items
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <version>2.5.4</version>
        <executions>
          <execution>
            <id>bundle-manifest</id>
            <phase>process-classes</phase>
            <configuration>
              <instructions>
                <Bundle-SymbolicName>org.antlr.antlr4-tool</Bundle-SymbolicName>
              </instructions>
            </configuration>
            <goals>
              <goal>manifest</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      -->
      <plugin> <!-- this just jars up tool stuff and sets main class -->
        <artifactId>maven-jar-plugin</artifactId>
        <version>3.0.0</version>
        <configuration>
          <archive>
            <manifest>
              <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
              <mainClass>org.antlr.v4.Tool</mainClass>
            </manifest>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.antlr</groupId>
        <artifactId>antlr3-maven-plugin</artifactId>
        <version>3.5.2</version>
        <configuration>
          <sourceDirectory>src</sourceDirectory>
          <verbose>true</verbose>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>antlr</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
