<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2015-2023 Sergey Karpushin 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. -->
<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.skarpushin</groupId>
	<version>6.3.2</version>
	<artifactId>summerb-parent</artifactId>
	<packaging>pom</packaging>
	<name>summerb-parent</name>

	<url>https://github.com/skarpushin/summerb</url>
	<description>summerb - is a set of building blocks for real-world java-based
		web apps</description>

	<distributionManagement>
		<snapshotRepository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
		<repository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
		</repository>
	</distributionManagement>

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

	<properties>
		<java.version>11</java.version>

		<modular-name>parent</modular-name>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<maven.compiler.debug>true</maven.compiler.debug>
		<maven.compiler.debuglevel>lines,vars,source</maven.compiler.debuglevel>

		<skip.unit.tests>false</skip.unit.tests>

		<junit.version>4.13.2</junit.version>
		<junit-jupiter.version>5.9.3</junit-jupiter.version>
		<dumbster.version>1.6</dumbster.version>

		<servlet-api.version>4.0.1</servlet-api.version>
		<slf4j.version>1.7.36</slf4j.version>
		<spring-framework.version>5.3.26</spring-framework.version>
		<spring-security.version>5.7.7</spring-security.version>
		<mariadb.version>3.1.3</mariadb.version>
		<mysql.version>8.0.33</mysql.version>
		<postgresql.version>42.3.8</postgresql.version>
		<commons-io.version>2.9.0</commons-io.version>
		<log4j-core.version>2.20.0</log4j-core.version>
		<guava.version>31.1-jre</guava.version>
		<gson.version>2.10.1</gson.version>
		<springfox-swagger2.version>2.7.0</springfox-swagger2.version>
		<mail.version>1.4.7</mail.version>
		<encoder.version>1.2.3</encoder.version> <!-- OWASP encoder -->
		<commons-fileupload.version>1.5</commons-fileupload.version>
		<byte-buddy.version>1.14.4</byte-buddy.version>
		<hibernate-validator.version>6.2.5.Final</hibernate-validator.version>
		<spring-boot.version>2.7.12</spring-boot.version>
		
	</properties>

	<scm>
		<url>https://github.com/skarpushin/summerb</url>
		<connection>scm:git:git://github.com/skarpushin/summerb</connection>
		<developerConnection>scm:git:ssh://github.com:skarpushin/summerb.git</developerConnection>
	</scm>

	<developers>
		<developer>
			<id>skarpushin</id>
			<name>Sergey Karpushin</name>
			<email>sergey.v.karpushin@gmail.com</email>
			<url>https://github.com/skarpushin</url>
		</developer>
	</developers>


	<dependencies>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>${junit.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter-params</artifactId>
			<version>${junit-jupiter.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter-engine</artifactId>
			<version>${junit-jupiter.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-junit-jupiter</artifactId>
			<version>5.3.1</version>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<testResources>
			<testResource>
				<directory>${project.basedir}/src/test/java</directory>
				<excludes>
					<exclude>**/*.java</exclude>
				</excludes>
			</testResource>
			<testResource>
				<directory>${project.basedir}/src/test/resources</directory>
			</testResource>
		</testResources>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<version>3.3.0</version>
				<executions>
					<execution>
						<goals>
							<goal>test-jar</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<archive>
						<manifestEntries>
							<Automatic-Module-Name>org.summerb.${modular-name}</Automatic-Module-Name>
						</manifestEntries>
					</archive>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.11.0</version>
				<configuration>
					<source>11</source>
					<target>11</target>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>flatten-maven-plugin</artifactId>
				<version>1.5.0</version>
				<configuration>
					<flattenMode>oss</flattenMode>
				</configuration>
				<executions>
					<execution>
						<id>flatten</id>
						<phase>process-resources</phase>
						<goals>
							<goal>flatten</goal>
						</goals>
					</execution>
					<execution>
						<id>flatten.clean</id>
						<phase>clean</phase>
						<goals>
							<goal>clean</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>3.1.0</version>
				<configuration>
					<skipTests>${skip.unit.tests}</skipTests>
					<includes>
						<include>**/*Test.class</include>
					</includes>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<profiles>
		<profile>
			<id>release</id>
			<activation>
				<activeByDefault>false</activeByDefault>
			</activation>
			<build>
				<plugins>
					<plugin>
						<!-- See documentation there
						https://central.sonatype.org/pages/apache-maven.html -->
						<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>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<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>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<version>3.5.0</version>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

</project>
