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

	<parent>
		<groupId>org.eclipse.xtext</groupId>
		<artifactId>xtext-parent</artifactId>
		<version>2.38.0</version>
	</parent>

	<artifactId>org.eclipse.xtext.maven.parent</artifactId>
	<packaging>pom</packaging>

	<url>https://www.eclipse.org/Xtext/</url>
	<name>Xtext Maven Plugin Parent POM</name>
	<description>Xtext is a framework for development of programming languages and domain-specific languages. With Xtext you define your language using a powerful grammar language. As a result you get a full infrastructure, including parser, linker, typechecker, compiler as well as editing support for Eclipse, LSP and your favorite web browser.</description>

	<properties>
		<root-dir>${basedir}/..</root-dir>
		<maven.version>3.6.0</maven.version>

		<project.build.sourceEncoding>ISO-8859-1</project.build.sourceEncoding>
		<project.reporting.outputEncoding>ISO-8859-1</project.reporting.outputEncoding>
		<maven.javadoc.failOnError>false</maven.javadoc.failOnError>
		<maven.javadoc.opts></maven.javadoc.opts>
	</properties>

	<build>
		<extensions>
			<!-- See https://jira.codehaus.org/browse/MINSTALL-102 -->
			<extension>
				<groupId>org.apache.maven.archetype</groupId>
				<artifactId>archetype-packaging</artifactId>
				<version>3.0.1</version>
			</extension>
		</extensions>
		<plugins>
			<plugin>
				<artifactId>maven-source-plugin</artifactId>
				<executions>
					<execution>
						<id>attach-sources</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<artifactId>maven-javadoc-plugin</artifactId>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<phase>package</phase>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<additionalOptions>${maven.javadoc.opts}</additionalOptions>
				</configuration>
			</plugin>
		</plugins>
		<pluginManagement>
			<plugins>
				<plugin>
					<artifactId>maven-antrun-plugin</artifactId>
					<version>3.1.0</version>
				</plugin>
				<plugin>
					<artifactId>maven-enforcer-plugin</artifactId>
					<version>3.2.1</version>
				</plugin>
				<plugin>
					<artifactId>maven-install-plugin</artifactId>
					<version>2.5.2</version>
				</plugin>
				<plugin>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>3.4.1</version>
				</plugin>
				<plugin>
					<artifactId>maven-plugin-plugin</artifactId>
					<version>3.12.0</version>
				</plugin>
				<plugin>
					<artifactId>maven-source-plugin</artifactId>
					<version>3.2.1</version>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>

	<profiles>
		<profile>
			<id>doclint-java8-disable</id>
			<activation>
				<jdk>[1.8,)</jdk>
			</activation>
			<properties>
				<javadoc.opts>-Xdoclint:none -html5</javadoc.opts>
			</properties>
		</profile>
		<profile>
			<!-- Mac OSX Jdk fails to load javadoc -->
			<id>javadoc-location-mac</id>
			<activation>
				<file>
					<exists>${java.home}/../bin/javadoc</exists>
					<missing>${java.home}/bin/javadoc</missing>
				</file>
			</activation>
			<properties>
				<javadocExecutable>${java.home}/../bin/javadoc</javadocExecutable>
			</properties>
		</profile>
		<profile>
			<id>useSonatypeSnapshots</id>
			<repositories>
				<repository>
					<id>sonatype-snapshots</id>
					<url>https://oss.sonatype.org/content/repositories/snapshots</url>
					<snapshots>
						<enabled>true</enabled>
						<checksumPolicy>fail</checksumPolicy>
					</snapshots>
					<releases>
						<enabled>false</enabled>
					</releases>
				</repository>
			</repositories>
		</profile>
	</profiles>

</project>
