<?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>dev.galasa</groupId>
	<artifactId>galasa-maven-plugin</artifactId>
	<packaging>maven-plugin</packaging>
	<version>1.1.0</version>

	<name>Galasa Maven Plugin</name>
	<description>Maven plugin for build Galasa artifacts such as the OBR, Test Catalog</description>
	<url>https://galasa.dev</url>

	<licenses>
		<license>
			<name>Eclipse Public License - v 2.0</name>
			<url>https://www.eclipse.org/legal/epl-2.0</url>
		</license>
	</licenses>

	<developers>
		<developer>
			<name>Galasa Contributors</name>
			<email>galasa-maintainers@lists.openmainframeproject.org</email>
			<organization>Linux Foundation</organization>
			<organizationUrl>https://github.com/galasa-dev</organizationUrl>
		</developer>
	</developers>

	<scm>
		<url>https://github.com/galasa-dev/galasa</url>
		<connection>scm:git:git:://github.com/galasa-dev/galasa</connection>
		<developerConnection>scm:git:git:://github.com/galasa-dev/galasa</developerConnection>
	</scm>

	<issueManagement>
		<url>https://github.com/galasa-dev/projectmanagement/issues</url>
		<system>GitHub</system>
	</issueManagement>

	<distributionManagement>
		<repository>
			<id>galasa.release.repo</id>
			<url>${galasa.release.repo}</url>
		</repository>
		<snapshotRepository>
			<id>galasa.snapshot.repo</id>
			<url>${galasa.snapshot.repo}</url>
		</snapshotRepository>
	</distributionManagement>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<maven.build.timestamp.format>yyyyMMddHHmm</maven.build.timestamp.format>
	</properties>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>dev.galasa</groupId>
				<artifactId>dev.galasa.platform</artifactId>
				<version>1.1.0</version>
				<type>pom</type>
          		<scope>import</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<dependencies>
		<dependency>
			<groupId>org.apache.maven.plugin-tools</groupId>
			<artifactId>maven-plugin-annotations</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.maven</groupId>
			<artifactId>maven-plugin-api</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.maven.shared</groupId>
			<artifactId>maven-shared-utils</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.maven</groupId>
			<artifactId>maven-artifact</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.maven</groupId>
			<artifactId>maven-core</artifactId>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.maven.plugin-testing</groupId>
			<artifactId>maven-plugin-testing-harness</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>commons-codec</groupId>
			<artifactId>commons-codec</artifactId>
		</dependency>
		<dependency>
			<groupId>commons-io</groupId>
			<artifactId>commons-io</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.felix</groupId>
			<artifactId>org.apache.felix.bundlerepository</artifactId>
		</dependency>
		<dependency>
			<groupId>org.reflections</groupId>
			<artifactId>reflections</artifactId>
		</dependency>
		<dependency>
			<groupId>com.google.code.gson</groupId>
			<artifactId>gson</artifactId>
		</dependency>
		<dependency>
			<groupId>org.assertj</groupId>
			<artifactId>assertj-core</artifactId>
		</dependency>

		<dependency>
			<groupId>dev.galasa</groupId>
			<artifactId>dev.galasa.plugin.common</artifactId>
		</dependency>

		<dependency>
			<groupId>dev.galasa</groupId>
			<artifactId>dev.galasa.plugin.common.impl</artifactId>
		</dependency>

		<dependency>
			<groupId>dev.galasa</groupId>
			<artifactId>dev.galasa.plugin.common.test</artifactId>
			<scope>test</scope>
		</dependency>
 	</dependencies>

	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-plugin-plugin</artifactId>
					<version>3.15.1</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-gpg-plugin</artifactId>
					<version>1.5</version>
				</plugin>
				<plugin>
					<groupId>com.google.code.maven-replacer-plugin</groupId>
					<artifactId>maven-replacer-plugin</artifactId>
					<version>1.4.0</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>3.13.0</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-site-plugin</artifactId>
					<version>3.21.0</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-source-plugin</artifactId>
					<version>3.3.1</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>3.11.2</version>
				</plugin>
			</plugins>
		</pluginManagement>

		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-plugin-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<source>17</source>
					<target>17</target>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-gpg-plugin</artifactId>
				<executions>
					<execution>
						<id>sign-artifacts</id>
						<phase>verify</phase>
						<goals>
							<goal>sign</goal>
						</goals>
						<configuration>
							<gpgArguments>
								<arg>--pinentry-mode</arg>
								<arg>loopback</arg>
							</gpgArguments>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<!-- This plugin generates and adds the META-INF/maven/plugin.xml file to the built jar. -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-plugin-plugin</artifactId>
				<executions>
					<execution>
						<id>galasa-maven-plugin</id>
						<goals>
							<goal>descriptor</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			
			<plugin>
				<groupId>com.google.code.maven-replacer-plugin</groupId>
				<artifactId>maven-replacer-plugin</artifactId>
				<executions>
					<execution>
						<phase>process-resources</phase>
						<goals>
							<goal>replace</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<file>git.hash</file>
					<outputFile>${project.build.directory}/classes/META-INF/git.hash</outputFile>
					<replacements>
						<replacement>
							<token>@hash@</token>
							<value>${env.GIT_COMMIT}</value>
						</replacement>
					</replacements>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<executions>
					<execution>
					<id>attach-sources</id>
					<goals>
						<goal>jar</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>

</project>
