<?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>
	<groupId>com.github.fworks</groupId>
	<artifactId>simplerestdoc</artifactId>
	<version>1.0</version>

	<name>Simple Rest Doc</name>
	<description>Generate a simple documentation of the RestControllers</description>
	<url>https://github.com/fworks/SimpleRestDoc</url>

	<!-- Sonatype OSS -->
	<parent>
		<groupId>org.sonatype.oss</groupId>
		<artifactId>oss-parent</artifactId>
		<version>7</version>
	</parent>

	<licenses>
		<!-- Required: license information: -->
		<license>
			<name>The MIT License (MIT)</name>
			<url>http://opensource.org/licenses/MIT</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<maven.compiler.source>1.8</maven.compiler.source>
		<maven.compiler.target>1.8</maven.compiler.target>
	</properties>

	<scm>
		<!-- Required: source control information: -->
		<connection>scm:git:https://github.com/fworks/SimpleRestDoc.git</connection>
		<developerConnection>scm:git:https://github.com/fworks/SimpleRestDoc.git</developerConnection>
		<url>http://github.com/fworks/SimpleRestDoc</url>
		<tag>HEAD</tag>
	</scm>

	<!-- Required: developer information: -->
	<developers>
		<developer>
			<id>fworks</id>
			<name>Flavio Castro</name>
			<email>flaviolcastro@gmail.com</email>
			<roles>
				<role>project owner</role>
				<role>administrator</role>
				<role>developer</role>
			</roles>
		</developer>
	</developers>

	<dependencies>
		<!-- https://mvnrepository.com/artifact/org.springframework/spring-web -->
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-web</artifactId>
			<version>4.3.6.RELEASE</version>
		</dependency>

		<dependency>
			<groupId>com.google.code.gson</groupId>
			<artifactId>gson</artifactId>
			<version>2.6.2</version>
		</dependency>

		<dependency>
			<groupId>org.reflections</groupId>
			<artifactId>reflections</artifactId>
			<version>0.9.9</version>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<!-- Required: source JAR -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>3.0.1</version>
				<executions>
					<execution>
						<id>attach-sources</id>
						<phase>verify</phase>
						<goals>
							<goal>jar-no-fork</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<!-- Required: javadoc JAR -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>2.10.4</version>
				<executions>
					<execution>
						<id>attach-javadoc</id>
						<phase>verify</phase>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
				<version>2.5.3</version>
				<configuration>
					<tagNameFormat>v@{project.version}</tagNameFormat>
					<mavenExecutorId>forked-path</mavenExecutorId>
					<useReleaseProfile>true</useReleaseProfile>
					<arguments>-Psonatype-oss-release</arguments>
				</configuration>

			</plugin>

			<plugin>
				<groupId>org.sonatype.plugins</groupId>
				<artifactId>nexus-staging-maven-plugin</artifactId>
				<version>1.6.7</version>
				<extensions>true</extensions>
				<configuration>
					<serverId>ossrh</serverId>
					<nexusUrl>https://oss.sonatype.org/</nexusUrl>
					<autoReleaseAfterClose>true</autoReleaseAfterClose>
				</configuration>
			</plugin>

				<!-- Release configuration: -->
 			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
				<version>2.4.1</version>
				<configuration>

					<!-- Automated passphrase entry:

					To pass your passphrase to the build automatically, so avoiding
						manual interaction, you'll need to put the passphrase into settings.xml.
						You don't really want that to be in plain text, so you'll want to follow:
						http://maven.apache.org/guides/mini/guide-encryption.html -->
					<arguments>-Dgpg.passphrase=${gpg.passphrase}</arguments>

					<!-- Manual passphrase entry:

					This is the simplest secure solution, but requires you to type
						your key passphrase in manually when performing a release. No biggie unless
						you want your CI server to decide when to release for you. -->
					<mavenExecutorId>forked-path</mavenExecutorId>

				</configuration>
			</plugin>  
		</plugins>
	</build>

	<profiles>

		<!-- GPG Signature on release -->
		<profile>
			<id>release-sign-artifacts</id>
			<activation>
				<property>
					<name>performRelease</name>
					<value>true</value>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>1.4</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>

	</profiles>

</project>