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

    Copyright (C) 2002 Mike Hummel (mh@mhus.de)

    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/maven-v4_0_0.xsd">

	<modelVersion>4.0.0</modelVersion>
    <version>8.1.0</version>
	<artifactId>mhus-commons</artifactId>
	<groupId>de.mhus.lib</groupId>
	<packaging>jar</packaging>
	<description>Library with useful tools to write java programms</description>
	<url>http://www.mhus.link</url>
	<name>mhus-commons</name>
    
    <properties>
		<sonar.organization>mhus</sonar.organization>
		<sonar.host.url>https://sonarcloud.io</sonar.host.url>

		<maven.java.version>17</maven.java.version>
		<jline.version>3.25.0</jline.version>
		<jackson.version>2.16.1</jackson.version>
		<snakeyaml.version>2.2</snakeyaml.version>
		<bouncycastle.version>1.77</bouncycastle.version>
		<junit.juniper.version>5.6.2</junit.juniper.version>
		<junit.platform.version>1.6.2</junit.platform.version>
		<tmpl.plugin>1.1.0</tmpl.plugin>
		<license.plugin>2.11.1</license.plugin>
		<git-code-format-maven-plugin.version>5.3</git-code-format-maven-plugin.version>
		<nexus.plugin.version>1.6.13</nexus.plugin.version>
		<gpg.plugin.version>3.1.0</gpg.plugin.version>
	</properties>
    
    <inceptionYear>2002</inceptionYear>
	<licenses>
		<license>
			<name>The Apache Software License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
			<distribution>repo</distribution>
		</license>
	</licenses>
	<scm>
		<url>https://github.com/mhus/mhus-commons</url>
		<connection>scm:git:https://github.com/mhus/mhus-commons/</connection>
		<tag>HEAD</tag>
	</scm>
	<developers>
		<developer>
			<id>mhu</id>
			<name>Mike Hummel</name>
			<email>mh@mhus.de</email>
			<url>http://www.mhus.de</url>
		</developer>
	</developers>
	<build>
		<defaultGoal>install</defaultGoal>
		<plugins>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.11.0</version>
				<configuration>
					<source>${maven.java.version}</source>
					<target>${maven.java.version}</target>
					<annotationProcessorPaths>
						<annotationProcessorPath>
							<groupId>org.projectlombok</groupId>
							<artifactId>lombok</artifactId>
							<version>1.18.30</version>
						</annotationProcessorPath>
					</annotationProcessorPaths>
					<compilerArgs>
						<arg>-parameters</arg>
					</compilerArgs>
				</configuration>
			</plugin>
			<plugin>
				<groupId>net.revelc.code.formatter</groupId>
				<artifactId>formatter-maven-plugin</artifactId>
				<version>2.23.0</version>
				<configuration>
					<lineEnding>LF</lineEnding>
					<encoding>UTF-8</encoding>
					<skip>false</skip>
					<excludes>
						<exclude>**/target/**</exclude>
						<exclude>**/src/main/resources/**</exclude>
						<exclude>**/src/test/resources/**</exclude>
						<exclude>**/docs/**</exclude>
					</excludes>
				</configuration>
				<executions>
					<execution>
						<phase>validate</phase>
						<goals>
							<goal>format</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

		</plugins>

	</build>

    <dependencies>

		<dependency>
			<groupId>org.jline</groupId>
			<artifactId>jline</artifactId>
			<version>${jline.version}</version>
		</dependency>
		<dependency>
			<groupId>com.fasterxml.jackson.core</groupId>
			<artifactId>jackson-databind</artifactId>
			<version>${jackson.version}</version>
		</dependency>
		<dependency>
			<groupId>org.yaml</groupId>
			<artifactId>snakeyaml</artifactId>
			<version>${snakeyaml.version}</version>
		</dependency>
		<dependency>
			<groupId>org.projectlombok</groupId>
			<artifactId>lombok</artifactId>
			<version>1.18.30</version>
			<optional>true</optional>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>2.0.7</version>
		</dependency>
		<dependency>
			<artifactId>bcprov-jdk18on</artifactId>
			<groupId>org.bouncycastle</groupId>
			<version>${bouncycastle.version}</version>
		</dependency>

		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter-engine</artifactId>
			<version>${junit.juniper.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter-api</artifactId>
			<version>${junit.juniper.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.junit.platform</groupId>
			<artifactId>junit-platform-commons</artifactId>
			<version>${junit.platform.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.junit.platform</groupId>
			<artifactId>junit-platform-launcher</artifactId>
			<version>${junit.platform.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.assertj</groupId>
			<artifactId>assertj-core</artifactId>
			<version>3.24.2</version>
			<scope>test</scope>
		</dependency>

     </dependencies>



    <profiles>
		<profile>
		<id>release</id>
		<build>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-gpg-plugin</artifactId>
					<version>${gpg.plugin.version}</version>
					<executions>
						<execution>
							<id>sign-artifacts</id>
							<phase>verify</phase>
							<goals>
								<goal>sign</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>de.mhus.mvn.plugin</groupId>
					<artifactId>versioning-maven-plugin</artifactId>
					<version>1.0.1</version>
					<executions>
						<execution>
							<phase>validate</phase>
							<goals>
								<goal>validate-no-snapshots</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>org.sonatype.plugins</groupId>
					<artifactId>nexus-staging-maven-plugin</artifactId>
					<version>${nexus.plugin.version}</version>
					<extensions>true</extensions>
					<configuration>
						<serverId>ossrh</serverId>
						<nexusUrl>https://oss.sonatype.org/</nexusUrl>
						<autoReleaseAfterClose>true</autoReleaseAfterClose>
					</configuration>
				</plugin>

			</plugins>
		</build>
		</profile>
        <profile>
            <id>deploy</id>
			<build>
				<plugins>
					<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</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<version>3.3.0</version>
						<configuration>
							<failOnError>false</failOnError>
						</configuration>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>de.mhus.mvn.plugin</groupId>
						<version>${tmpl.plugin}</version>
						<artifactId>tmpl-maven-plugin</artifactId>
						<configuration>
							<files>
								<directory>${basedir}</directory>
								<includes>
									<include>**/*</include>
								</includes>
							</files>
						</configuration>
						<executions>
							<execution>
								<phase>package</phase>
								<goals>
									<goal>tmpl</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>de.mhus.mvn.plugin</groupId>
						<artifactId>license-maven-plugin</artifactId>
						<version>${license.plugin}</version>
						<configuration>
							<aggregate>true</aggregate>
							<header>com/mycila/maven/plugin/license/templates/APACHE-2.txt</header>
							<properties>
								<owner>Mike Hummel</owner>
								<email>mh@mhus.de</email>
							</properties>
							<excludes>
								<exclude>README.*</exclude>
								<exclude>readme.*</exclude>
								<exclude>LICENSE</exclude>
								<exclude>LICENSE_HEADER</exclude>
								<exclude>src/test/resources/**</exclude>
								<exclude>src/main/resources/**</exclude>
								<exclude>mhu-liferay-theme/src/main/webapp/**</exclude>
								<exclude>docs/**</exclude>
							</excludes>
						</configuration>
						<executions>
							<execution>
								<phase>validate</phase>
								<goals>
									<goal>format</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>

			<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>

        </profile>
    </profiles>
</project>