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

    Copyright (c) 2014-2015 Oracle and/or its affiliates. All rights reserved.
    Copyright (c) 2018, 2022 Eclipse Krazo committers and contributors

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

    SPDX-License-Identifier: Apache-2.0

-->
<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>
	<parent>
		<groupId>org.eclipse.ee4j</groupId>
		<artifactId>project</artifactId>
		<version>1.0.6</version>
	</parent>

	<groupId>org.eclipse.krazo.ext</groupId>
	<artifactId>krazo-ext-parent</artifactId>
	<version>3.0.0</version>
	<packaging>pom</packaging>
	<name>Eclipse Krazo Extensions Parent</name>

	<modules>
		<module>asciidoc</module>
		<module>freemarker</module>
<!--		<module>handlebars</module>-->
		<module>jinja2</module>
		<module>mustache</module>
		<module>pebble</module>
		<module>stringtemplate</module>
		<module>thymeleaf</module>
		<module>velocity</module>
		<module>testsuite</module>
	</modules>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<maven.compiler.release>11</maven.compiler.release>

		<!-- MVC / Krazo dependencies -->
		<jakartaee.version>10.0.0</jakartaee.version>
		<mvc.version>2.1.0</mvc.version>
		<krazo.version>3.0.0</krazo.version>

		<!-- Extension dependencies -->
		<asciidoctorj.version>2.5.2</asciidoctorj.version>
		<freemarker.version>2.3.31</freemarker.version>
		<jade4j.version>1.3.2</jade4j.version>
		<jinjava.version>2.6.0</jinjava.version>
		<compiler.version>0.9.10</compiler.version>
		<pebble.version>3.1.5</pebble.version>
		<ST4.version>4.3.1</ST4.version>
		<thymeleaf.version>3.1.0.M1</thymeleaf.version>
		<velocity-engine-core.version>2.3</velocity-engine-core.version>

		<!-- Test dependencies -->
		<arquillian-bom.version>1.7.0.Alpha10</arquillian-bom.version>
		<shrinkwrap-resolver-bom.version>3.1.4</shrinkwrap-resolver-bom.version>
		<junit.version>4.13.2</junit.version>
		<slf4j.version>1.7.32</slf4j.version>
		<easymock.version>4.3</easymock.version>
		<hibernate-validator-cdi.version>8.0.0.CR1</hibernate-validator-cdi.version>
		<resteasy.version>6.1.0.Beta2</resteasy.version>
		<gf.jakarta.el.version>5.0.0-M1</gf.jakarta.el.version>
		<htmlunit.version>2.63.0</htmlunit.version>
		<arquillian-glassfish-remote-3.1.version>1.0.0.Final</arquillian-glassfish-remote-3.1.version>
		<wildfly-arquillian-container.version>5.0.0.Alpha3</wildfly-arquillian-container.version>
		<arquillian-liberty-managed-jakarta.version>2.0.2</arquillian-liberty-managed-jakarta.version>

		<!-- Plugin config -->
		<dash.skip>true</dash.skip>
		<dependencyCheckSkip>true</dependencyCheckSkip>
		<!-- Plugin versions -->
		<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
		<maven-jar-plugin.version>3.2.0</maven-jar-plugin.version>
		<maven-javadoc-plugin.version>3.2.0</maven-javadoc-plugin.version>
		<maven-source-plugin.version>3.2.1</maven-source-plugin.version>
		<maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
		<findbugs-maven-plugin.version>3.0.3</findbugs-maven-plugin.version>
		<maven-surefire-plugin.version>2.22.2</maven-surefire-plugin.version>
		<jacoco-maven-plugin.version>0.8.7</jacoco-maven-plugin.version>
		<maven-bundle-plugin.version>5.1.1</maven-bundle-plugin.version>
		<maven-war-plugin.version>3.2.3</maven-war-plugin.version>
		<dependency-check-maven.version>6.0.1</dependency-check-maven.version>
		<versions-maven-plugin.version>2.8.1</versions-maven-plugin.version>
		<maven-failsafe-plugin.version>2.18.1</maven-failsafe-plugin.version>
		<maven-resources-plugin.version>3.1.0</maven-resources-plugin.version>
		<maven-dependency-plugin.version>3.3.0</maven-dependency-plugin.version>
		<license-tool-plugin.version>0.0.1-SNAPSHOT</license-tool-plugin.version>
	</properties>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>jakarta.platform</groupId>
				<artifactId>jakarta.jakartaee-api</artifactId>
				<version>${jakartaee.version}</version>
				<scope>provided</scope>
			</dependency>

			<dependency>
				<groupId>jakarta.mvc</groupId>
				<artifactId>jakarta.mvc-api</artifactId>
				<version>${mvc.version}</version>
				<scope>provided</scope>
			</dependency>

			<dependency>
				<groupId>org.eclipse.krazo</groupId>
				<artifactId>krazo-core</artifactId>
				<version>${krazo.version}</version>
				<scope>provided</scope>
			</dependency>

			<dependency>
				<groupId>org.eclipse.krazo</groupId>
				<artifactId>krazo-jersey</artifactId>
				<version>${krazo.version}</version>
				<scope>provided</scope>
			</dependency>

			<dependency>
				<groupId>org.asciidoctor</groupId>
				<artifactId>asciidoctorj</artifactId>
				<version>${asciidoctorj.version}</version>
			</dependency>

			<dependency>
				<groupId>org.freemarker</groupId>
				<artifactId>freemarker</artifactId>
				<version>${freemarker.version}</version>
			</dependency>

			<dependency>
				<groupId>de.neuland-bfi</groupId>
				<artifactId>jade4j</artifactId>
				<version>${jade4j.version}</version>
			</dependency>

			<dependency>
				<groupId>com.hubspot.jinjava</groupId>
				<artifactId>jinjava</artifactId>
				<version>${jinjava.version}</version>
			</dependency>

			<dependency>
				<groupId>com.github.spullara.mustache.java</groupId>
				<artifactId>compiler</artifactId>
				<version>${compiler.version}</version>
			</dependency>

			<dependency>
				<groupId>io.pebbletemplates</groupId>
				<artifactId>pebble</artifactId>
				<version>${pebble.version}</version>
			</dependency>

			<dependency>
				<groupId>org.antlr</groupId>
				<artifactId>ST4</artifactId>
				<version>${ST4.version}</version>
			</dependency>

			<dependency>
				<groupId>org.thymeleaf</groupId>
				<artifactId>thymeleaf</artifactId>
				<version>${thymeleaf.version}</version>
			</dependency>

			<dependency>
				<groupId>org.apache.velocity</groupId>
				<artifactId>velocity-engine-core</artifactId>
				<version>${velocity-engine-core.version}</version>
				<scope>compile</scope>
			</dependency>

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

			<dependency>
				<groupId>junit</groupId>
				<artifactId>junit</artifactId>
				<version>${junit.version}</version>
				<scope>test</scope>
			</dependency>


			<dependency>
				<groupId>org.easymock</groupId>
				<artifactId>easymock</artifactId>
				<version>${easymock.version}</version>
				<scope>test</scope>
			</dependency>

			<dependency>
				<groupId>org.hibernate.validator</groupId>
				<artifactId>hibernate-validator-cdi</artifactId>
				<version>${hibernate-validator-cdi.version}</version>
				<scope>test</scope>
			</dependency>

			<dependency>
				<groupId>org.glassfish</groupId>
				<artifactId>jakarta.el</artifactId>
				<version>${gf.jakarta.el.version}</version>
				<scope>test</scope>
			</dependency>

			<dependency>
				<groupId>net.sourceforge.htmlunit</groupId>
				<artifactId>htmlunit</artifactId>
				<version>${htmlunit.version}</version>
				<scope>test</scope>
			</dependency>

			<dependency>
				<groupId>org.jboss.arquillian.container</groupId>
				<artifactId>arquillian-glassfish-remote-3.1</artifactId>
				<version>${arquillian-glassfish-remote-3.1.version}</version>
				<scope>test</scope>
			</dependency>

			<dependency>
				<groupId>org.wildfly.arquillian</groupId>
				<artifactId>wildfly-arquillian-container-remote</artifactId>
				<version>${wildfly-arquillian-container.version}</version>
				<scope>test</scope>
			</dependency>

			<dependency>
				<groupId>org.wildfly.arquillian</groupId>
				<artifactId>wildfly-arquillian-container-managed</artifactId>
				<version>${wildfly-arquillian-container.version}</version>
				<scope>test</scope>
			</dependency>

			<dependency>
				<groupId>io.openliberty.arquillian</groupId>
				<artifactId>arquillian-liberty-managed-jakarta-junit</artifactId>
				<version>${arquillian-liberty-managed-jakarta.version}</version>
				<type>pom</type>
				<scope>test</scope>
			</dependency>

			<dependency>
				<groupId>io.openliberty.arquillian</groupId>
				<artifactId>arquillian-liberty-managed-jakarta</artifactId>
				<version>${arquillian-liberty-managed-jakarta.version}</version>
				<scope>test</scope>
			</dependency>

			<dependency>
				<groupId>fish.payara.arquillian</groupId>
				<artifactId>arquillian-payara-server-4-remote</artifactId>
				<version>1.0.Beta3</version>
				<scope>test</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<dependencies>
		<dependency>
			<groupId>jakarta.platform</groupId>
			<artifactId>jakarta.jakartaee-api</artifactId>
		</dependency>

		<dependency>
			<groupId>jakarta.mvc</groupId>
			<artifactId>jakarta.mvc-api</artifactId>
		</dependency>

		<dependency>
			<groupId>org.eclipse.krazo</groupId>
			<artifactId>krazo-core</artifactId>
		</dependency>
	</dependencies>

	<build>
		<pluginManagement>
			<plugins>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>${maven-compiler-plugin.version}</version>
					<configuration>
						<showWarnings>true</showWarnings>
						<compilerArgs>
							<arg>-Xlint:serial</arg>
							<!-- disables the warning about the missing -bootclasspath on java 11 -->
							<arg>-Xlint:-options</arg>
							<arg>-Werror</arg>
						</compilerArgs>
					</configuration>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-jar-plugin</artifactId>
					<version>${maven-jar-plugin.version}</version>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>${maven-javadoc-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-gpg-plugin</artifactId>
					<version>${maven-gpg-plugin.version}</version>
				</plugin>

				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>findbugs-maven-plugin</artifactId>
					<version>${findbugs-maven-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.jacoco</groupId>
					<artifactId>jacoco-maven-plugin</artifactId>
					<version>${jacoco-maven-plugin.version}</version>
				</plugin>

				<plugin>
					<groupId>org.apache.felix</groupId>
					<artifactId>maven-bundle-plugin</artifactId>
					<version>${maven-bundle-plugin.version}</version>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-war-plugin</artifactId>
					<version>${maven-war-plugin.version}</version>
					<inherited>true</inherited>
					<configuration>
						<failOnMissingWebXml>false</failOnMissingWebXml>
					</configuration>
				</plugin>

				<plugin>
					<groupId>org.owasp</groupId>
					<artifactId>dependency-check-maven</artifactId>
					<version>${dependency-check-maven.version}</version>
					<configuration>
						<skip>${dependencyCheckSkip}</skip>
						<!-- Some dependencies ship dlls for native bindings.
						This avoids warnings about dotnet not being installed -->
						<assemblyAnalyzerEnabled>false</assemblyAnalyzerEnabled>
						<!-- skip dependencies provided by the application servers -->
						<skipProvidedScope>true</skipProvidedScope>
						<excludes>
							<!-- Shrinkwrap includes a lot of the dependencies and some of them are quiet old.
							We don't ship it, but only use it in the tck. So we won't report those libs as vulnerable -->
							<exclude>org.jboss.shrinkwrap.resolver:*</exclude>
						</excludes>
						<suppressionFile>dependency-check-suppressions.xml</suppressionFile>
						<!-- We allow the build to pass with vulnerabilities below HIGH or MEDIUM.
						We should lower this value to MEDIUM (4) once all issues in upstream libraries
						(especially from the ext-package) have been resolved. -->
						<failBuildOnCVSS>7</failBuildOnCVSS>
					</configuration>
				</plugin>

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

				<plugin>
					<groupId>org.asciidoctor</groupId>
					<artifactId>asciidoctor-maven-plugin</artifactId>
					<version>${asciidoctor-maven-plugin.version}</version>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-failsafe-plugin</artifactId>
					<version>${maven-failsafe-plugin.version}</version>
					<inherited>true</inherited>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-surefire-report-plugin</artifactId>
					<version>2.18.1</version>
					<configuration>
						<showSuccess>true</showSuccess>
					</configuration>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-resources-plugin</artifactId>
					<version>${maven-resources-plugin.version}</version>
					<configuration>
						<escapeString>\</escapeString>
					</configuration>
				</plugin>

				<plugin>
					<groupId>org.eclipse.dash</groupId>
					<artifactId>license-tool-plugin</artifactId>
					<version>${license-tool-plugin.version}</version>
					<configuration>
						<skip>${dash.skip}</skip>
					</configuration>
					<executions>
						<execution>
							<id>license-check</id>
							<goals>
								<goal>license-check</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>

	<profiles>
		<profile>
			<id>release</id>
			<activation>
				<property>
					<name>performRelease</name>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>

					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<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-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>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
