<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>info.kuechler.image</groupId>
	<artifactId>scale</artifactId>
	<version>0.1.0</version>
	<packaging>jar</packaging>

	<name>imagescale</name>
	<url>https://github.com/frickels/imagescale</url>
	<description>Image scale for JPEG, PNG and GIF</description>

	<inceptionYear>2019</inceptionYear>
	<issueManagement>
		<system>github</system>
		<url>https://github.com/frickels/imagescale/issues</url>
	</issueManagement>
	<licenses>
		<license>
			<name>The Apache License, Version 2.0</name>
			<url>https://opensource.org/licenses/Apache-2.0</url>
		</license>
	</licenses>
	<developers>
		<developer>
			<name>Ariel Küchler</name>
			<url>https://github.com/admiralsmaster</url>
		</developer>
	</developers>
	<scm>
		<connection>scm:git:git://github.com/frickels/imagescale.git</connection>
		<developerConnection>scm:git:ssh://github.com:frickels/imagescale.git</developerConnection>
		<url>http://github.com/frickels/imagescale/tree/master</url>
	</scm>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.java.version>1.8</project.java.version>

		<org.slf4j.version>1.7.28</org.slf4j.version>
		<org.junit.jupiter.version>5.5.2</org.junit.jupiter.version>
		<com.twelvemonkeys.version>3.4.2</com.twelvemonkeys.version>
	</properties>

	<dependencies>
		<dependency>
			<groupId>com.twelvemonkeys.imageio</groupId>
			<artifactId>imageio-jpeg</artifactId>
			<version>${com.twelvemonkeys.version}</version>
		</dependency>
		<dependency>
			<groupId>com.twelvemonkeys.common</groupId>
			<artifactId>common-image</artifactId>
			<version>${com.twelvemonkeys.version}</version>
		</dependency>

		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter-api</artifactId>
			<version>${org.junit.jupiter.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter-engine</artifactId>
			<version>${org.junit.jupiter.version}</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>${org.slf4j.version}</version>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-simple</artifactId>
			<version>${org.slf4j.version}</version>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<!-- higher version to use maven-fluido-skin:1.6 for maven site -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-site-plugin</artifactId>
				<version>3.8.2</version>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.8.1</version>
				<configuration>
					<source>${project.java.version}</source>
					<target>${project.java.version}</target>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<version>3.1.2</version>
				<configuration>
					<archive>
						<manifestEntries>
							<Automatic-Module-Name>info.kuechler.image.scale</Automatic-Module-Name>
						</manifestEntries>
					</archive>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<reporting>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-project-info-reports-plugin</artifactId>
				<version>3.0.0</version>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>3.1.1</version>
				<reportSets>
					<reportSet>
						<reports>
							<report>javadoc</report>
							<report>test-javadoc</report>
						</reports>
					</reportSet>
					<reportSet>
						<id>aggregate</id>
						<inherited>false</inherited>
					</reportSet>
				</reportSets>
				<configuration>
					<encoding>${project.build.sourceEncoding}</encoding>
				</configuration>
			</plugin>
		</plugins>
	</reporting>

	<profiles>
		<profile>
			<!-- profile for release, local development is faster w/o this plugins -->
			<id>release</id>

			<!-- snapshot repository for release -->
			<distributionManagement>
				<snapshotRepository>
					<id>ossrh</id>
					<url>https://oss.sonatype.org/content/repositories/snapshots</url>
				</snapshotRepository>
			</distributionManagement>

			<build>
				<plugins>

					<!-- right java version, no release with higher java version -->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-enforcer-plugin</artifactId>
						<version>1.4.1</version>
						<executions>
							<execution>
								<id>display-info</id>
								<phase>validate</phase>
								<goals>
									<goal>display-info</goal>
								</goals>
							</execution>
							<execution>
								<id>enforce-versions</id>
								<phase>validate</phase>
								<goals>
									<goal>enforce</goal>
								</goals>
								<configuration>
									<rules>
										<requireJavaVersion>
											<version>[1.8,1.9)</version>
										</requireJavaVersion>
									</rules>
								</configuration>
							</execution>
						</executions>
					</plugin>

					<!-- create source jar -->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<version>3.1.0</version>
						<executions>
							<execution>
								<id>attach-sources</id>
								<goals>
									<goal>jar-no-fork</goal>
								</goals>
							</execution>
						</executions>
					</plugin>

					<!-- create javadoc jar -->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<version>3.1.1</version>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>

					<!-- sign files -->
					<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>
							</execution>
						</executions>
					</plugin>

					<!-- plugin for release -->
					<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>false</autoReleaseAfterClose>
						</configuration>
					</plugin>

				</plugins>
			</build>
		</profile>
	</profiles>
</project>
