<?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.omnifaces</groupId>
	<artifactId>omniutils</artifactId>
	<version>0.17</version>
	<packaging>jar</packaging>

	<name>OmniUtils</name>
	<description>Java utility library</description>
	<url>https://github.com/omnifaces/omniutils</url>
	<organization>
		<name>OmniFaces</name>
		<url>https://omnifaces.org</url>
	</organization>
	<inceptionYear>2015</inceptionYear>

	<developers>
		<developer>
			<id>balusc</id>
			<name>Bauke Scholtz</name>
			<email>balusc@gmail.com</email>
		</developer>
		<developer>
			<id>arjan.tijms</id>
			<name>Arjan Tijms</name>
			<email>arjan.tijms@gmail.com</email>
		</developer>
		<developer>
			<id>jan.beernink</id>
			<name>Jan Beernink</name>
			<email>jan.beernink@gmail.com</email>
		</developer>
	</developers>

	<licenses>
		<license>
			<name>The Apache Software License, Version 2.0</name>
			<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<scm>
		<url>https://github.com/omnifaces/omniutils</url>
		<connection>scm:git:git://github.com/omnifaces/omniutils.git</connection>
		<developerConnection>scm:git:git@github.com:omnifaces/omniutils.git</developerConnection>
	</scm>

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

	<properties>

		<!-- Java version. -->
		<javase.version>11</javase.version>

		<!-- Essential Maven defaults. -->
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<maven.compiler.source>${javase.version}</maven.compiler.source>
		<maven.compiler.target>${javase.version}</maven.compiler.target>
	</properties>

	<dependencies>

		<!-- Test dependencies.	-->
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.13.2</version>
			<scope>test</scope>
			<exclusions>
				<exclusion>
					<groupId>org.hamcrest</groupId>
					<artifactId>hamcrest-core</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>org.hamcrest</groupId>
			<artifactId>hamcrest-all</artifactId>
			<version>1.3</version>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<plugins>
		  <plugin>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>3.0.0</version>
                <executions>
                    <execution>
                        <id>enforce-maven</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireMavenVersion>
                                    <version>3.6.0</version>
                                </requireMavenVersion>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

			<!-- Add missing license headers to source files. -->
			<plugin>
				<groupId>com.mycila</groupId>
				<artifactId>license-maven-plugin</artifactId>
				<version>4.1</version>
				<configuration>
					<header>license.txt</header>
					<excludes>
						<exclude>*.*</exclude>
					</excludes>
					<mapping>
						<java>SLASHSTAR_STYLE</java>
					</mapping>
				</configuration>
				<executions>
					<execution>
						<phase>process-sources</phase>
						<goals>
							<goal>format</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<!-- Configure the jar with the binaries. -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<version>3.2.2</version>
				<configuration>
					<archive>
						<manifest>
							<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
							<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
						</manifest>
						<manifestEntries>
							<URL>${project.url}</URL>
							<Extension-Name>${project.artifactId}</Extension-Name>
						</manifestEntries>
					</archive>
				</configuration>
			</plugin>

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

			<!-- Configure the jar with the javadoc. -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>3.4.1</version>
				<configuration>
				    <quiet>true</quiet>
				    <additionalparam>-Xdoclint:none</additionalparam>
                    <additionalOptions>-Xdoclint:none</additionalOptions>
                    <additionalJOption>-Xdoclint:none</additionalJOption>
					<notimestamp>true</notimestamp>
					<splitindex>true</splitindex>
					<doctitle>OmniUtils API documentation</doctitle>
				</configuration>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<!-- Configure JGitFlow. -->
			<plugin>
				<groupId>external.atlassian.jgitflow</groupId>
				<artifactId>jgitflow-maven-plugin</artifactId>
				<version>1.0-m5.1</version>
				<configuration>
					<noDeploy>true</noDeploy>
					<enableFeatureVersions>true</enableFeatureVersions>
				</configuration>
			</plugin>

            <!-- Configure snapshot deployment (release deployment is done via 'release' profile). -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>3.1.4</version>
                <configuration>
                    <skip>false</skip>
                </configuration>
            </plugin>
		</plugins>
	</build>

	<profiles>

        <!-- Release deploy: mvn clean deploy -P release -->
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.sonatype.central</groupId>
                        <artifactId>central-publishing-maven-plugin</artifactId>
                        <version>0.10.0</version>
                        <extensions>true</extensions>
                        <configuration>
                            <autoPublish>true</autoPublish>
                        </configuration>
                    </plugin>

                    <!-- Signing with GPG is a requirement for a release deployment to Maven central. -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>3.2.8</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
	</profiles>

</project>