<?xml version="1.0" encoding="UTF-8"?>

<!--
  The MIT License (MIT)
  Copyright (c) 2014-2020 Mickael Jeanroy

  Permission is hereby granted, free of charge, to any person obtaining a copy
  of this software and associated documentation files (the "Software"), to deal
  in the Software without restriction, including without limitation the rights
  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  copies of the Software, and to permit persons to whom the Software is
  furnished to do so, subject to the following conditions:

  The above copyright notice and this permission notice shall be included in
  all copies or substantial portions of the Software.

  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  THE SOFTWARE.
-->

<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>com.github.mjeanroy</groupId>
	<artifactId>springmvc-mustache</artifactId>
	<version>2.0.0</version>
	<name>springmvc-mustache</name>
	<description>Mustache templating with spring mvc</description>
	<packaging>jar</packaging>
	<url>https://github.com/mjeanroy/springmvc-mustache</url>

	<licenses>
		<license>
			<name>MIT License</name>
			<url>http://www.opensource.org/licenses/mit-license.php</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<developers>
		<developer>
			<id>mjeanroy</id>
			<name>Mickael Jeanroy</name>
			<email>mickael.jeanroy@gmail.com</email>
		</developer>
	</developers>

	<scm>
		<connection>scm:git:git@github.com:mjeanroy/springmvc-mustache.git</connection>
		<developerConnection>scm:git:git@github.com:mjeanroy/springmvc-mustache.git</developerConnection>
		<url>https://github.com/mjeanroy/springmvc-mustache</url>
	  <tag>springmvc-mustache-2.0.0</tag>
  </scm>

	<distributionManagement>
		<snapshotRepository>
			<id>sonatype-nexus-snapshots</id>
			<name>Sonatype Nexus Snapshots</name>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
		<repository>
			<id>sonatype-nexus-staging</id>
			<name>Nexus Release Repository</name>
			<url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
		</repository>
	</distributionManagement>

	<properties>
		<java-module-name>com.github.mjeanroy.springmvc.mustache</java-module-name>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

		<!-- Java Version -->
		<!-- Compile with jdk8, but keep compatibility with java 6 -->
		<java.version>1.8</java.version>
		<java.source.version>1.8</java.source.version>
		<java.target.version>1.8</java.target.version>
		<java.signature.version>java18</java.signature.version>

		<!-- Plugins -->
		<maven-clean-plugin.version>3.1.0</maven-clean-plugin.version>
		<maven-surefire-plugin.version>2.22.2</maven-surefire-plugin.version>
		<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
		<maven-enforcer-plugin.version>1.4.1</maven-enforcer-plugin.version>
		<maven-release-plugin.version>2.5.3</maven-release-plugin.version>
		<maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
		<maven-source-plugin.version>3.2.1</maven-source-plugin.version>
		<maven-javadoc-plugin.version>3.2.0</maven-javadoc-plugin.version>
		<maven-install-plugin.version>2.5.2</maven-install-plugin.version>
		<maven-jar-plugin.version>3.2.0</maven-jar-plugin.version>
		<maven-resources-plugin.version>3.1.0</maven-resources-plugin.version>
		<maven-deploy-plugin.version>2.8.2</maven-deploy-plugin.version>
		<maven-site-plugin.version>3.9.0</maven-site-plugin.version>
		<versions-maven-plugin.version>2.7</versions-maven-plugin.version>
		<animal-sniffer-maven-plugin.version>1.17</animal-sniffer-maven-plugin.version>

		<slf4j.version>1.7.30</slf4j.version>
		<log4j.version>2.13.3</log4j.version>
		<jmustache.version>1.15</jmustache.version>
		<handlebars.version>4.2.0</handlebars.version>
		<mustache.java.version>0.9.6</mustache.java.version>
		<spring.version>5.2.6.RELEASE</spring.version>
		<spring-context.version>${spring.version}</spring-context.version>
		<spring-web.version>${spring.version}</spring-web.version>
		<spring-webmvc.version>${spring.version}</spring-webmvc.version>
		<spring-test.version>${spring.version}</spring-test.version>
		<spring-boot.version>2.3.0.RELEASE</spring-boot.version>
		<javax.servlet-api.version>3.1.0</javax.servlet-api.version>
		<jsp-api.version>2.0</jsp-api.version>

		<junit.version>5.6.0</junit.version>
		<assertj.version>3.16.1</assertj.version>
		<mockito.version>3.3.3</mockito.version>
		<commons-lang3.version>3.10</commons-lang3.version>
		<commons-io.version>2.7</commons-io.version>
		<equalsverifier.version>3.3</equalsverifier.version>
		<logback.version>1.2.3</logback.version>
		<log4j-to-slf4j.version>2.13.3</log4j-to-slf4j.version>
	</properties>

	<dependencies>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-context</artifactId>
			<version>${spring-context.version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-web</artifactId>
			<version>${spring-web.version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-webmvc</artifactId>
			<version>${spring-webmvc.version}</version>
		</dependency>

		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-autoconfigure</artifactId>
			<version>${spring-boot.version}</version>
			<optional>true</optional>
		</dependency>

		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>${slf4j.version}</version>
			<optional>true</optional>
		</dependency>

		<dependency>
			<groupId>org.apache.logging.log4j</groupId>
			<artifactId>log4j-api</artifactId>
			<version>${log4j.version}</version>
			<optional>true</optional>
		</dependency>
		<dependency>
			<groupId>org.apache.logging.log4j</groupId>
			<artifactId>log4j-core</artifactId>
			<version>${log4j.version}</version>
			<optional>true</optional>
		</dependency>

		<dependency>
			<groupId>com.samskivert</groupId>
			<artifactId>jmustache</artifactId>
			<version>${jmustache.version}</version>
			<optional>true</optional>
		</dependency>
		<dependency>
			<groupId>com.github.jknack</groupId>
			<artifactId>handlebars</artifactId>
			<version>${handlebars.version}</version>
			<optional>true</optional>
		</dependency>
		<dependency>
			<groupId>com.github.spullara.mustache.java</groupId>
			<artifactId>compiler</artifactId>
			<version>${mustache.java.version}</version>
			<optional>true</optional>
		</dependency>

		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>javax.servlet-api</artifactId>
			<version>${javax.servlet-api.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>javax.servlet.jsp</groupId>
			<artifactId>jsp-api</artifactId>
			<version>${jsp-api.version}</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter</artifactId>
			<version>${junit.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.assertj</groupId>
			<artifactId>assertj-core</artifactId>
			<version>${assertj.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-core</artifactId>
			<version>${mockito.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-lang3</artifactId>
			<version>${commons-lang3.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>commons-io</groupId>
			<artifactId>commons-io</artifactId>
			<version>${commons-io.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>nl.jqno.equalsverifier</groupId>
			<artifactId>equalsverifier</artifactId>
			<version>${equalsverifier.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-test</artifactId>
			<version>${spring-test.version}</version>
			<scope>test</scope>
		</dependency>

		<!-- Log implementation -->
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>jcl-over-slf4j</artifactId>
			<version>${slf4j.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.logging.log4j</groupId>
			<artifactId>log4j-to-slf4j</artifactId>
			<version>${log4j-to-slf4j.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>ch.qos.logback</groupId>
			<artifactId>logback-core</artifactId>
			<version>${logback.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>ch.qos.logback</groupId>
			<artifactId>logback-classic</artifactId>
			<version>${logback.version}</version>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-clean-plugin</artifactId>
				<version>${maven-clean-plugin.version}</version>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-install-plugin</artifactId>
				<version>${maven-install-plugin.version}</version>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>${maven-surefire-plugin.version}</version>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<version>${maven-jar-plugin.version}</version>
				<configuration>
					<archive>
						<manifestEntries>
							<Automatic-Module-Name>${java-module-name}</Automatic-Module-Name>
						</manifestEntries>
					</archive>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-resources-plugin</artifactId>
				<version>${maven-resources-plugin.version}</version>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-deploy-plugin</artifactId>
				<version>${maven-deploy-plugin.version}</version>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-site-plugin</artifactId>
				<version>${maven-site-plugin.version}</version>
			</plugin>

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

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-gpg-plugin</artifactId>
				<version>${maven-gpg-plugin.version}</version>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>${maven-source-plugin.version}</version>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>${maven-javadoc-plugin.version}</version>
				<configuration>
					<source>${java.source.version}</source>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
				<version>${maven-release-plugin.version}</version>
				<configuration>
					<autoVersionSubmodules>true</autoVersionSubmodules>
					<mavenExecutorId>forked-path</mavenExecutorId>
					<useReleaseProfile>false</useReleaseProfile>
					<arguments>-Prelease</arguments>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>versions-maven-plugin</artifactId>
				<version>${versions-maven-plugin.version}</version>
			</plugin>

			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>animal-sniffer-maven-plugin</artifactId>
				<version>${animal-sniffer-maven-plugin.version}</version>
				<executions>
					<execution>
						<id>check-java-api</id>
						<phase>test</phase>
						<goals>
							<goal>check</goal>
						</goals>
						<configuration>
							<signature>
								<groupId>org.codehaus.mojo.signature</groupId>
								<artifactId>${java.signature.version}</artifactId>
								<version>1.0</version>
							</signature>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

	<profiles>
		<!-- Profile activated with mvn release tasks -->
		<profile>
			<id>release</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>${maven-gpg-plugin.version}</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.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<version>${maven-source-plugin.version}</version>
						<executions>
							<execution>
								<id>attach-sources</id>
								<goals>
									<goal>jar-no-fork</goal>
								</goals>
							</execution>
						</executions>
					</plugin>

					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<version>${maven-javadoc-plugin.version}</version>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
						<configuration>
							<source>${java.source.version}</source>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
