<!--


       Copyright 2018-2020 the original author or authors.

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

            http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.


-->
<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.github.chhorz</groupId>
	<artifactId>javadoc-parser-parent</artifactId>
	<version>0.1.0</version>
	<packaging>pom</packaging>

	<name>Javadoc Parser Parent</name>
	<description>Java library for parsing information from a structured Javadoc string.</description>
	<url>https://github.com/chhorz/javadoc-parser</url>
	<inceptionYear>2018</inceptionYear>

	<licenses>
		<license>
			<name>The Apache License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
		</license>
	</licenses>

	<modules>
		<module>javadoc-parser</module>
		<module>javadoc-parser-documentation</module>
	</modules>

	<developers>
		<developer>
			<name>Christian Horz</name>
			<email>horz.christian at googlemail.com</email>
			<roles>
				<role>Project lead</role>
			</roles>
		</developer>
	</developers>

	<scm>
		<connection>scm:git:git@github.com:chhorz/javadoc-parser.git</connection>
		<developerConnection>scm:git:git@github.com:chhorz/javadoc-parser.git</developerConnection>
		<url>https://github.com/chhorz/javadoc-parser</url>
	</scm>

	<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>

	<properties>
		<!-- common -->
		<maven.deploy.skip>true</maven.deploy.skip>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<java.source.version>1.8</java.source.version>
		<java.target.version>1.8</java.target.version>

		<!-- dependency version -->
		<assertj.core.version>3.14.0</assertj.core.version>
		<junit.jupiter.version>5.5.2</junit.jupiter.version>

		<!-- plugin versions -->
		<license.maven.plugin.version>3.0</license.maven.plugin.version>
		<maven.compiler.plugin.version>3.8.0</maven.compiler.plugin.version>
		<maven.gpg.plugin.version>1.5</maven.gpg.plugin.version>
		<maven.javadoc.plugin.version>2.10.3</maven.javadoc.plugin.version>
		<maven.source.plugin.version>2.4</maven.source.plugin.version>
		<maven.surefire.plugin.version>2.22.1</maven.surefire.plugin.version>
		<nexus.staging.maven.plugin.version>1.6.7</nexus.staging.maven.plugin.version>
	</properties>

	<dependencyManagement>
		<dependencies>
			<!-- Test -->
			<dependency>
				<groupId>org.junit.jupiter</groupId>
				<artifactId>junit-jupiter</artifactId>
				<version>${junit.jupiter.version}</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.assertj</groupId>
				<artifactId>assertj-core</artifactId>
				<version>${assertj.core.version}</version>
				<scope>test</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.sonatype.plugins</groupId>
					<artifactId>nexus-staging-maven-plugin</artifactId>
					<version>${nexus.staging.maven.plugin.version}</version>
					<extensions>true</extensions>
					<configuration>
						<serverId>ossrh</serverId>
						<nexusUrl>https://oss.sonatype.org/</nexusUrl>
						<autoReleaseAfterClose>false</autoReleaseAfterClose>
					</configuration>
				</plugin>
				<plugin>
					<groupId>com.mycila</groupId>
					<artifactId>license-maven-plugin</artifactId>
					<version>${license.maven.plugin.version}</version>
					<configuration>
						<header>${basedir}/../LICENSE.txt</header>
						<strictCheck>true</strictCheck>
						<excludes>
							<exclude>**/*.adoc</exclude>
							<exclude>**/LICENSE.txt</exclude>
							<exclude>build/**</exclude>
							<exclude>.github/**</exclude>
							<exclude>.gitattributes</exclude>
							<exclude>.gitignore</exclude>
						</excludes>
					</configuration>
					<executions>
						<execution>
							<goals>
								<goal>check</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>${maven.compiler.plugin.version}</version>
					<configuration>
						<source>${java.source.version}</source>
						<target>${java.target.version}</target>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-source-plugin</artifactId>
					<version>${maven.source.plugin.version}</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>${maven.javadoc.plugin.version}</version>
					<executions>
						<execution>
							<id>attach-javadocs</id>
							<goals>
								<goal>jar</goal>
							</goals>
						</execution>
					</executions>
					<configuration>
						<failOnError>false</failOnError>
					</configuration>
				</plugin>
				<plugin>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>${maven.surefire.plugin.version}</version>
				</plugin>
			</plugins>
		</pluginManagement>

		<plugins>
			<plugin>
				<groupId>org.sonatype.plugins</groupId>
				<artifactId>nexus-staging-maven-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>com.mycila</groupId>
				<artifactId>license-maven-plugin</artifactId>
				<configuration>
					<header>LICENSE.txt</header>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<profiles>

		<profile>
			<id>sign</id>
			<build>
				<plugins>
					<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>

		<profile>
			<id>build-extras</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<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>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

</project>