<?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.metaschema</groupId>
		<artifactId>metaschema-framework</artifactId>
		<version>0.12.0</version>
	</parent>

	<artifactId>metaschema-maven-plugin</artifactId>

	<packaging>maven-plugin</packaging>

	<name>Metaschema Maven Plugin</name>

	<url>${site.url}${project.artifactId}/</url>
	<distributionManagement>
		<site>
			<id>nist-pages</id>
			<url>${site.url}${project.artifactId}/</url>
		</site>
	</distributionManagement>

	<properties>
		<dependency.maven-shared-incremental.version>1.1</dependency.maven-shared-incremental.version>
	</properties>

	<prerequisites>
		<maven>${plugin.maven-plugin.version}</maven>
	</prerequisites>
	<dependencies>
		<dependency>
			<groupId>${project.parent.groupId}</groupId>
			<artifactId>metaschema-schema-generator</artifactId>
		</dependency>
		<dependency>
			<groupId>${project.parent.groupId}</groupId>
			<artifactId>metaschema-java-codegen</artifactId>
		</dependency>
		<dependency>
			<groupId>${project.parent.groupId}</groupId>
			<artifactId>metaschema-model</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.maven</groupId>
			<artifactId>maven-plugin-api</artifactId>
			<version>${mojo.maven.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.maven</groupId>
			<artifactId>maven-core</artifactId>
			<version>${mojo.maven.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.maven</groupId>
			<artifactId>maven-artifact</artifactId>
			<version>${mojo.maven.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.maven</groupId>
			<artifactId>maven-model</artifactId>
			<version>${mojo.maven.version}</version>
			<scope>provided</scope>
		</dependency>
		<!-- <dependency> -->
		<!-- <groupId>org.apache.maven.shared</groupId> -->
		<!-- <artifactId>maven-shared-incremental</artifactId> -->
		<!-- <version>${dependency.maven-shared-incremental.version}</version> -->
		<!-- </dependency> -->
		<dependency>
			<groupId>org.apache.maven.plugin-tools</groupId>
			<artifactId>maven-plugin-annotations</artifactId>
			<scope>provided</scope>
			<optional>true</optional>
		</dependency>
		<dependency>
			<groupId>org.codehaus.plexus</groupId>
			<artifactId>plexus-utils</artifactId>
			<version>${dependency.plexus-utils.version}</version>
		</dependency>
		<dependency>
			<groupId>org.codehaus.plexus</groupId>
			<artifactId>plexus-build-api</artifactId>
			<version>${dependency.plexus-build-api.version}</version>
		</dependency>
		<!-- <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-project</artifactId> <version>2.2.1</version> </dependency> -->
		<dependency>
			<groupId>org.apache.logging.log4j</groupId>
			<artifactId>log4j-core</artifactId>
		</dependency>
		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter-api</artifactId>
			<scope>test</scope>
		</dependency>
		<!-- <dependency> -->
		<!-- <groupId>org.junit.jupiter</groupId> -->
		<!-- <artifactId>junit-jupiter-engine</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>
				<executions>
					<execution>
						<id>default-addPluginArtifactMetadata</id>
						<phase>package</phase>
						<goals>
							<goal>addPluginArtifactMetadata</goal>
						</goals>
					</execution>
					<execution>
						<id>default-descriptor</id>
						<phase>process-classes</phase>
						<goals>
							<goal>descriptor</goal>
						</goals>
						<configuration>
							<goalPrefix>metaschema</goalPrefix>
							<skipErrorNoDescriptorsFound>false</skipErrorNoDescriptorsFound>
						</configuration>
					</execution>
					<execution>
						<id>help-mojo</id>
						<goals>
							<goal>helpmojo</goal>
						</goals>
						<configuration>
							<skipErrorNoDescriptorsFound>false</skipErrorNoDescriptorsFound>
						</configuration>
					</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>
						<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>
						</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>