<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/maven-v4_0_0.xsd">
	<modelVersion>4.0.0</modelVersion>

	<parent>
        <groupId>au.net.causal.jgitcrypt</groupId>
        <artifactId>jgitcrypt-parent</artifactId>
        <version>1.2</version>
    </parent>

	<artifactId>jgitcrypt-maven-plugin</artifactId>
	<packaging>maven-plugin</packaging>

	<name>JGitcrypt Maven Plugin</name>

	<properties>
		<maven.version>3.8.6</maven.version>
	</properties>

	<dependencies>
		<dependency>
			<groupId>${project.groupId}</groupId>
			<artifactId>jgitcrypt</artifactId>
			<version>${project.version}</version>
		</dependency>

		<dependency>
			<groupId>org.codehaus.plexus</groupId>
			<artifactId>plexus-utils</artifactId>
			<version>3.5.1</version>
		</dependency>

		<dependency>
			<groupId>org.apache.maven</groupId>
			<artifactId>maven-plugin-api</artifactId>
			<version>${maven.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.maven</groupId>
			<artifactId>maven-core</artifactId>
			<version>${maven.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.maven</groupId>
			<artifactId>maven-embedder</artifactId>
			<version>${maven.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.maven.plugin-tools</groupId>
			<artifactId>maven-plugin-annotations</artifactId>
			<version>3.13.1</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter-engine</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.junit.platform</groupId>
			<artifactId>junit-platform-launcher</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.assertj</groupId>
			<artifactId>assertj-core</artifactId>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-plugin-plugin</artifactId>
				<version>3.13.1</version>
				<executions>
					<execution>
						<id>default-descriptor</id>
						<phase>process-classes</phase>
					</execution>
					<execution>
						<id>help-goal</id>
						<goals>
							<goal>helpmojo</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.codehaus.plexus</groupId>
				<artifactId>plexus-component-metadata</artifactId>
				<version>2.2.0</version>
				<executions>
					<execution>
						<goals>
							<goal>generate-metadata</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-invoker-plugin</artifactId>
				<version>3.7.0</version>
				<configuration>
					<cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
					<settingsFile>src/it/settings.xml</settingsFile>
					<localRepositoryPath>${it.local.repo}</localRepositoryPath>
					<postBuildHookScript>verify</postBuildHookScript>
					<pomIncludes>
						<pomInclude>*</pomInclude>
					</pomIncludes>
					<goals>
						<goal>clean</goal>
						<goal>verify</goal>
					</goals>
					<skipInvocation>${skipITs}</skipInvocation>
					<properties>
						<user.home>${project.build.directory}/it/userhome</user.home>
					</properties>
					<scriptVariables>
						<pluginGroupId>${project.groupId}</pluginGroupId>
						<pluginArtifactId>${project.artifactId}</pluginArtifactId>
						<pluginVersion>${project.version}</pluginVersion>
						<userHome>${project.build.directory}/it/userhome</userHome>
					</scriptVariables>
				</configuration>
				<executions>
					<execution>
						<id>integration-test</id>
						<goals>
							<goal>install</goal>
							<goal>run</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-enforcer-plugin</artifactId>
				<executions>
					<execution>
						<id>enforce-bytecode-version</id>
						<goals>
							<goal>enforce</goal>
						</goals>
						<configuration>
							<rules>
								<enforceBytecodeVersion>
									<maxJdkVersion>${java.compile.version}</maxJdkVersion>
								</enforceBytecodeVersion>
							</rules>
							<fail>true</fail>
						</configuration>
					</execution>
				</executions>
				<dependencies>
					<dependency>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>extra-enforcer-rules</artifactId>
						<version>1.8.0</version>
					</dependency>
				</dependencies>
			</plugin>
		</plugins>
	</build>
</project>
