<?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>gov.nist.secauto.swid</groupId>
		<artifactId>swid-parent</artifactId>
		<version>0.7.0</version>
	</parent>

	<artifactId>swid-maven-plugin</artifactId>

	<packaging>maven-plugin</packaging>

	<name>Maven SWID Tag Generation Plugin </name>
	<description>This project is a ContainerDescriptorHandler that generates an ISO/IEC 19770-2:2015 SWID tag within a Maven assembly plugin execution.</description>

	<distributionManagement>
		<site>
			<id>site_scm</id>
			<url>${site.url}/${project.artifactId}/</url>
		</site>
	</distributionManagement>

	<dependencies>
		<dependency>
			<groupId>${project.groupId}</groupId>
			<artifactId>swid-builder</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.maven</groupId>
			<artifactId>maven-core</artifactId>
			<version>3.5.2</version>
		</dependency>
		<dependency>
			<groupId>org.apache.maven</groupId>
			<artifactId>maven-plugin-api</artifactId>
			<version>3.5.2</version>
		</dependency>
		<dependency>
			<groupId>org.apache.maven.plugin-tools</groupId>
			<artifactId>maven-plugin-annotations</artifactId>
			<version>3.5.1</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.codehaus.plexus</groupId>
			<artifactId>plexus-utils</artifactId>
			<version>3.1.0</version>
		</dependency>
		<dependency>
			<groupId>org.codehaus.plexus</groupId>
			<artifactId>plexus-io</artifactId>
			<version>3.0.0</version>
		</dependency>
		<dependency>
			<groupId>org.apache.maven.plugins</groupId>
			<artifactId>maven-assembly-plugin</artifactId>
			<version>${version.plugin.assembly}</version>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<pluginManagement>
			<plugins>
				<!--This plugin's configuration is used to store Eclipse m2e settings 
					only. It has no influence on the Maven build itself. -->
				<plugin>
					<groupId>org.eclipse.m2e</groupId>
					<artifactId>lifecycle-mapping</artifactId>
					<version>1.0.0</version>
					<configuration>
						<lifecycleMappingMetadata>
							<pluginExecutions>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>
											org.apache.maven.plugins
										</groupId>
										<artifactId>
											maven-plugin-plugin
										</artifactId>
										<versionRange>
											[3.6.0,)
										</versionRange>
										<goals>
											<goal>descriptor</goal>
											<goal>helpmojo</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore />
									</action>
								</pluginExecution>
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>

		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-plugin-plugin</artifactId>
				<configuration>
					<goalPrefix>swid</goalPrefix>
					<skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
				</configuration>
				<executions>
					<execution>
						<id>help-mojo</id>
						<goals>
							<goal>helpmojo</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.codehaus.plexus</groupId>
				<artifactId>plexus-component-metadata</artifactId>
				<version>2.1.0</version>
				<executions>
					<execution>
						<id>default-generate-metadata</id>
						<goals>
							<goal>generate-metadata</goal>
						</goals>
					</execution>
					<execution>
						<id>default-generate-test-metadata</id>
						<goals>
							<goal>generate-test-metadata</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-checkstyle-plugin</artifactId>
				<configuration>
					<sourceDirectories>
						<sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
						<sourceDirectory>${project.build.testSourceDirectory}</sourceDirectory>
					</sourceDirectories>
				</configuration>
			</plugin>

		</plugins>
	</build>
	<reporting>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-plugin-plugin</artifactId>
				<reportSets>
					<reportSet>
						<reports>
							<report>report</report>
						</reports>
					</reportSet>
				</reportSets>
			</plugin>
		</plugins>
	</reporting>
	<profiles>
		<profile>
			<id>run-its</id>
			<build>

				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-invoker-plugin</artifactId>
						<version>3.0.1</version>
						<configuration>
							<debug>true</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>
								<goal>package</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>
	</profiles>
</project>
