<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.commsen.maven</groupId>
	<artifactId>bom-helper-maven-plugin</artifactId>
	<version>0.4.0</version>
	<packaging>maven-plugin</packaging>

	<name>BOM Helper Maven Plugin</name>
	<description>Plugin providing some help for BOM projects.</description>
	<url>https://commsen.com/bom-helper-maven-plugin</url>

	<licenses>
		<license>
			<name>Apache License, Version 2.0</name>
			<url>https://www.apache.org/licenses/LICENSE-2.0</url>
		</license>
	</licenses>

	<organization>
		<name>Commsen International</name>
		<url>http://commsen.com/</url>
	</organization>

	<developers>
		<developer>
			<name>Milen Dyankov</name>
			<url>http://milendyankov.com</url>
		</developer>
	</developers>

	<scm>
		<url>https://github.com/commsen/bom-helper-maven-plugin</url>
		<connection>scm:git:https://github.com/commsen/bom-helper-maven-plugin.git</connection>
	</scm>

	<issueManagement>
		<system>Github</system>
		<url>https://github.com/commsen/bom-helper-maven-plugin/issues</url>
	</issueManagement>

	<properties>
		<maven.compiler.source>1.8</maven.compiler.source>
		<maven.compiler.target>1.8</maven.compiler.target>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<site.dir>${project.basedir}/../bom-helper-maven-plugin-site</site.dir>
	</properties>

	<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>
		<site>
			<id>GitHub pages</id>
			<url>https://commsen.com/bom-helper-maven-plugin</url>
		</site>
	</distributionManagement>


	<dependencies>
		<dependency>
			<groupId>org.apache.maven.shared</groupId>
			<artifactId>maven-artifact-transfer</artifactId>
			<version>0.11.0</version>
		</dependency>
		<dependency>
			<groupId>org.apache.maven.plugin-tools</groupId>
			<artifactId>maven-plugin-annotations</artifactId>
			<version>3.2</version>
			<scope>provided</scope>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-plugin-plugin</artifactId>
				<version>3.5</version>
				<configuration>
					<goalPrefix>bom-helper</goalPrefix>
					<skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
				</configuration>
				<executions>
					<execution>
						<id>mojo-descriptor</id>
						<goals>
							<goal>descriptor</goal>
						</goals>
					</execution>
					<execution>
						<id>help-goal</id>
						<goals>
							<goal>helpmojo</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
	<profiles>
		<profile>
			<id>run-its</id>
			<build>

				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-invoker-plugin</artifactId>
						<version>1.7</version>
						<configuration>
							<debug>false</debug>
							<cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
							<pomIncludes>
								<pomInclude>*/pom.xml</pomInclude>
							</pomIncludes>
							<postBuildHookScript>verify</postBuildHookScript>
							<localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
							<settingsFile>src/it/settings.xml</settingsFile>
							<goals>
								<goal>clean</goal>
								<goal>test-compile</goal>
							</goals>
						</configuration>
						<executions>
							<execution>
								<id>integration-test</id>
								<goals>
									<goal>install</goal>
									<goal>integration-test</goal>
									<goal>verify</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>

			</build>
		</profile>
		<profile>
			<id>site</id>
			<build>
				<defaultGoal>clean site site:stage</defaultGoal>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-site-plugin</artifactId>
						<version>3.6</version>
						<configuration>
							<stagingDirectory>${site.dir}</stagingDirectory>
							<skipDeploy>true</skipDeploy>
						</configuration>
					</plugin>
				</plugins>
			</build>
			<reporting>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-plugin-plugin</artifactId>
						<version>3.5</version>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<version>3.0.0-M1</version>
						<configuration>
						</configuration>
					</plugin>
				</plugins>
			</reporting>
		</profile>		
		<profile>
			<id>release</id>
			<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>
			<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>false</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>2.10.4</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.5</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
