<?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>org.silentsoft</groupId>
	<artifactId>actlist-plugin-sdk</artifactId>
	<version>2.2.0</version>
	<packaging>pom</packaging>

	<name>actlist-plugin-sdk</name>
	<description>Actlist Plugin SDK</description>
	<url>https://github.com/silentsoft/actlist-plugin-sdk</url>

	<scm>
		<url>https://github.com/silentsoft/actlist-plugin-sdk.git</url>
	</scm>

	<licenses>
		<license>
			<name>Apache License 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
		</license>
	</licenses>

	<developers>
		<developer>
			<name>Hyesung Lee</name>
			<email>hyesung.lee@silentsoft.org</email>
			<url>https://github.com/silentsoft</url>
		</developer>
	</developers>

	<properties>
		<java.version>1.8</java.version>
		<maven.compiler.source>1.8</maven.compiler.source>
		<maven.compiler.target>1.8</maven.compiler.target>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

		<mainClass>Plugin</mainClass>
	</properties>

	<build>
		<plugins>
			<plugin>
				<groupId>com.google.code.maven-replacer-plugin</groupId>
				<artifactId>replacer</artifactId>
				<executions>
					<execution>
						<id>initialize</id>
						<phase>initialize</phase>
						<goals>
							<goal>replace</goal>
						</goals>
						<configuration>
							<file>pom.xml</file>
							<replacements>
								<replacement>
									<token><![CDATA[<groupId>[_]groupId</groupId>]]></token>
									<value><![CDATA[<groupId>${groupId}</groupId>]]></value>
								</replacement>
								<replacement>
									<token><![CDATA[<artifactId>[_]artifactId</artifactId>]]></token>
									<value><![CDATA[<artifactId>${artifactId}</artifactId>]]></value>
								</replacement>
							</replacements>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.8.0</version>
				<configuration>
					<source>1.8</source>
					<target>1.8</target>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.22.2</version>
				<configuration>
					<argLine>-Dfile.encoding=UTF-8</argLine>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-resources-plugin</artifactId>
				<version>3.1.0</version>
				<executions>
					<execution>
						<id>copy-resources</id>
						<phase>validate</phase>
						<goals>
							<goal>copy-resources</goal>
						</goals>
						<configuration>
							<outputDirectory>${project.build.directory}/classes</outputDirectory>
							<resources>
								<resource>
									<directory>${project.build.sourceDirectory}</directory>
									<excludes>
										<exclude>**/*.java</exclude>
									</excludes>
								</resource>
							</resources>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-assembly-plugin</artifactId>
				<version>3.1.1</version>
				<dependencies>
					<dependency>
						<groupId>org.silentsoft</groupId>
						<artifactId>actlist-plugin-sdk-assembly-descriptor</artifactId>
						<version>1.1.0</version>
					</dependency>
				</dependencies>
				<configuration>
					<archive>
						<manifest>
							<mainClass>${mainClass}</mainClass>
						</manifest>
					</archive>
					<descriptorRefs>
						<descriptorRef>assembly</descriptorRef>
					</descriptorRefs>
					<finalName>${project.artifactId}-${project.version}</finalName>
					<appendAssemblyId>false</appendAssemblyId>
				</configuration>
				<executions>
					<execution>
						<id>make-assembly</id>
						<phase>package</phase>
						<goals>
							<goal>single</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

	<profiles>
		<profile>
			<id>release</id>
			<build>
				<plugins>

					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>1.6</version>
						<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>
					<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>true</autoReleaseAfterClose>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

	<dependencies>
		<dependency>
			<groupId>org.silentsoft</groupId>
			<artifactId>actlist-plugin</artifactId>
			<version>2.2.0</version>
			<scope>provided</scope>
		</dependency>
	</dependencies>

	<distributionManagement>
		<snapshotRepository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
	</distributionManagement>
</project>