
<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>
	<groupId>com.khubla.antlr</groupId>
	<artifactId>antlr4test-maven-plugin</artifactId>
	<packaging>maven-plugin</packaging>
	<version>1.11</version>
	<name>khubla.com Antlr4 test mojo</name>
	<description>antlr4test-maven-plugin is a maven mojo for testing Antlr4 grammars</description>
	<url>https://github.com/antlr/antlr4test-maven-plugin</url>
	<prerequisites>
		<maven>3.1.0</maven>
	</prerequisites>
	<developers>
		<developer>
			<id>teverett</id>
			<name>Tom Everett</name>
			<email>tom@khubla.com</email>
		</developer>
	</developers>
	<licenses>
		<license>
			<name>BSD 3-Clause License</name>
			<url>https://opensource.org/licenses/BSD-3-Clause</url>
			<distribution>repo</distribution>
		</license>
	</licenses>
	<scm>
		<url>https://github.com/antlr/antlr4test-maven-plugin.git</url>
	</scm>
	<organization>
		<name>antlr</name>
		<url>https://github.com/antlr</url>
	</organization>
	<properties>
		<maven.version>3.6.0</maven.version>
		<antlr.version>4.7.2</antlr.version>
	</properties>
	<dependencies>
		<dependency>
			<groupId>org.antlr</groupId>
			<artifactId>antlr4-runtime</artifactId>
			<version>${antlr.version}</version>
			<type>jar</type>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.maven</groupId>
			<artifactId>maven-plugin-api</artifactId>
			<version>${maven.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.maven.plugin-testing</groupId>
			<artifactId>maven-plugin-testing-harness</artifactId>
			<version>3.3.0</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.maven</groupId>
			<artifactId>maven-core</artifactId>
			<version>${maven.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.maven</groupId>
			<artifactId>maven-compat</artifactId>
			<version>${maven.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.maven.plugin-tools</groupId>
			<artifactId>maven-plugin-annotations</artifactId>
			<version>${maven.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.antlr</groupId>
			<artifactId>antlr4</artifactId>
			<version>${antlr.version}</version>
		</dependency>
		<dependency>
			<groupId>commons-io</groupId>
			<artifactId>commons-io</artifactId>
			<version>2.6</version>
		</dependency>
		<dependency>
			<groupId>org.codehaus.plexus</groupId>
			<artifactId>plexus-utils</artifactId>
			<version>3.1.1</version>
		</dependency>
		<dependency>
			<groupId>org.bitbucket.cowwoc</groupId>
			<artifactId>diff-match-patch</artifactId>
			<version>1.2</version>
		</dependency>
	</dependencies>
	<build>
		<plugins>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.8.0</version>
				<configuration>
					<source>1.7</source>
					<target>1.7</target>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-plugin-plugin</artifactId>
				<version>3.6.0</version>
				<configuration>
					<goalPrefix>antlr4test</goalPrefix>
				</configuration>
				<executions>
					<execution>
						<id>default-descriptor</id>
						<goals>
							<goal>descriptor</goal>
						</goals>
						<phase>process-classes</phase>
					</execution>
					<execution>
						<id>help-descriptor</id>
						<goals>
							<goal>helpmojo</goal>
						</goals>
						<phase>process-classes</phase>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.antlr</groupId>
				<artifactId>antlr4-maven-plugin</artifactId>
				<version>${antlr.version}</version>
				<configuration>
					<!-- directory generated-test-sources not possible with GrammarTestMojo using ClassLoader focused on /target/classes <outputDirectory>${project.build.directory}/generated-test-sources/antlr4</outputDirectory> -->
					<sourceDirectory>src/test/resources/</sourceDirectory>
					<grammars>tnt.g4</grammars>
				</configuration>
				<executions>
					<execution>
						<id>antlr4-test-resources</id>
						<!-- phase generate-test-sources not possible with GrammarTestMojo using ClassLoader focused on /target/classes <phase>generate-test-sources</phase> -->
						<goals>
							<goal>antlr4</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<artifactId>maven-antrun-plugin</artifactId>
				<version>1.8</version>
				<executions>
					<execution>
						<!-- delete from classes in phase prepare-package because test-classes could not be used with GrammarTestMojo using ClassLoader focused on /target/classes -->
						<id>delete-test-resources</id>
						<phase>prepare-package</phase>
						<goals>
							<goal>run</goal>
						</goals>
						<configuration>
							<target>
								<delete>
									<fileset dir="${project.build.outputDirectory}">
										<include name="tnt*" />
									</fileset>
								</delete>
							</target>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
		<finalName>${project.artifactId}-${project.version}</finalName>
	</build>
	<profiles>
		<profile>
			<id>deploy</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.sonatype.plugins</groupId>
						<artifactId>nexus-staging-maven-plugin</artifactId>
						<version>1.6.8</version>
						<extensions>true</extensions>
						<configuration>
							<serverId>ossrh</serverId>
							<nexusUrl>https://oss.sonatype.org/</nexusUrl>
							<autoReleaseAfterClose>true</autoReleaseAfterClose>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<version>3.0.1</version>
						<executions>
							<execution>
								<id>attach-sources</id>
								<goals>
									<goal>jar-no-fork</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<version>3.0.1</version>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>1.6</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
	<distributionManagement>
		<snapshotRepository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
		<repository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
		</repository>
	</distributionManagement>
</project>
