<!--

    Copyright © 2022 Pl4yingNight (pl4yingnight@gmail.com)

    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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>

	<parent>
		<groupId>net.runeduniverse.tools.build-helper</groupId>
		<artifactId>build-helper-java</artifactId>
		<version>2.1</version>
	</parent>

	<groupId>net.runeduniverse.lib.rogm</groupId>
	<artifactId>rogm-parent</artifactId>
	<version>${major-version}.${minor-version}.${artifact-version}</version>
	<packaging>pom</packaging>
	<name>ROGM</name>
	<url>https://github.com/RunedUniverse/rogm</url>
	<inceptionYear>2020</inceptionYear>

	<modules>
		<module>rogm-bom</module>
		<module>rogm-sources-bom</module>
		<module>rogm-core</module>
		<module>rogm-parser-json</module>
		<module>rogm-lang-cypher</module>
		<module>rogm-module-neo4j</module>
		<module>rogm-module-decorator</module>
	</modules>

	<licenses>
		<license>
			<name>Apache License, Version 2</name>
			<url>https://www.apache.org/licenses/LICENSE-2.0</url>
		</license>
	</licenses>

	<organization>
		<name>RunedUniverse</name>
		<url>https://www.runeduniverse.net</url>
	</organization>

	<developers>
		<developer>
			<id>pl4yingnight</id>
			<name>Pl4yingNight</name>
			<email>pl4yingnight@gmail.com</email>
			<organization>RunedUniverse</organization>
			<organizationUrl>https://www.runeduniverse.net</organizationUrl>
			<timezone>Europe/Vienna</timezone>
			<roles>
				<role>Maintainer</role>
				<role>Founder</role>
				<role>Architect</role>
				<role>Developer</role>
			</roles>
		</developer>
	</developers>

	<scm>
		<url>https://github.com/RunedUniverse/rogm</url>
		<connection>scm:git:git://github.com/RunedUniverse/rogm.git</connection>
		<developerConnection>scm:git:git@github.com:RunedUniverse/rogm.git</developerConnection>
	</scm>
	<issueManagement>
		<system>GitHub Issues</system>
		<url>https://github.com/RunedUniverse/rogm/issues</url>
	</issueManagement>

	<properties>
		<root-dir>${project.basedir}</root-dir>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<major-version>2</major-version>
		<minor-version>1</minor-version>
		<artifact-version>1</artifact-version>
		<!-- ACTIVITIONS -->
		<license-enforce>true</license-enforce>
		<!-- ACTIVITIONS - LICENSES -->
		<license-prj-utils-approve>true</license-prj-utils-approve>
		<license-apache2-approve>true</license-apache2-approve>
		<!-- VERSIONS -->
		<java-source-version>1.8</java-source-version>
	</properties>

	<profiles>
		<profile>
			<id>dev-install</id>
			<build>
				<defaultGoal>clean license:format toolchains:toolchain compile install</defaultGoal>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-toolchains-plugin</artifactId>
						<configuration>
							<toolchains>
								<jdk>
									<version>openjdk-1.8.0</version>
								</jdk>
							</toolchains>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-surefire-plugin</artifactId>
						<configuration>
							<groups>system</groups>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
		<!-- JENKINS -->
		<profile>
			<id>install</id>
			<build>
				<defaultGoal>
					org.apache.maven.plugins:maven-clean-plugin:clean@jenkins
					org.apache.maven.plugins:maven-toolchains-plugin:toolchain@jenkins
					org.apache.maven.plugins:maven-resources-plugin:resources@jenkins
					org.apache.maven.plugins:maven-compiler-plugin:compile@jenkins
					org.apache.maven.plugins:maven-resources-plugin:testResources@jenkins-testing
					org.apache.maven.plugins:maven-compiler-plugin:testCompile@jenkins-testing
					org.apache.maven.plugins:maven-jar-plugin:jar@jenkins
					org.apache.maven.plugins:maven-source-plugin:jar-no-fork@jenkins
					org.apache.maven.plugins:maven-javadoc-plugin:jar@jenkins
					org.apache.maven.plugins:maven-gpg-plugin:sign@jenkins
					org.apache.maven.plugins:maven-install-plugin:install@jenkins
				</defaultGoal>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-toolchains-plugin</artifactId>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-compiler-plugin</artifactId>
						<executions>
							<execution>
								<id>jenkins</id>
								<inherited>false</inherited>
								<phase>none</phase>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-jar-plugin</artifactId>
						<executions>
							<execution>
								<id>jenkins</id>
								<inherited>false</inherited>
								<phase>none</phase>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<executions>
							<execution>
								<id>jenkins</id>
								<inherited>false</inherited>
								<phase>none</phase>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<executions>
							<execution>
								<id>jenkins</id>
								<inherited>false</inherited>
								<phase>none</phase>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>test-junit-jupiter</id>
			<build>
				<defaultGoal>
					org.apache.maven.plugins:maven-toolchains-plugin:toolchain@jenkins-testing
					org.apache.maven.plugins:maven-surefire-plugin:test@jenkins-testing
				</defaultGoal>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-toolchains-plugin</artifactId>
						<executions>
							<execution>
								<id>jenkins-testing</id>
								<inherited>false</inherited>
								<phase>none</phase>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-resources-plugin</artifactId>
						<executions>
							<execution>
								<id>jenkins-testing</id>
								<inherited>false</inherited>
								<phase>none</phase>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-compiler-plugin</artifactId>
						<executions>
							<execution>
								<id>jenkins-testing</id>
								<inherited>false</inherited>
								<phase>none</phase>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-surefire-plugin</artifactId>
						<executions>
							<execution>
								<id>jenkins-testing</id>
								<inherited>false</inherited>
								<phase>none</phase>
								<configuration>
									<skip>true</skip>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>test-system</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-surefire-plugin</artifactId>
						<configuration>
							<groups>system</groups>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>test-db-neo4j</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-surefire-plugin</artifactId>
						<configuration>
							<groups>db-neo4j</groups>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>deploy</id>
			<build>
				<defaultGoal>
					org.apache.maven.plugins:maven-jar-plugin:jar@jenkins
					org.apache.maven.plugins:maven-deploy-plugin:deploy@jenkins
				</defaultGoal>
			</build>
		</profile>
		<profile>
			<id>deploy-signed</id>
			<build>
				<defaultGoal>
					org.apache.maven.plugins:maven-jar-plugin:jar@jenkins
					org.codehaus.mojo:build-helper-maven-plugin:attach-artifact@jenkins
					org.apache.maven.plugins:maven-deploy-plugin:deploy@jenkins
				</defaultGoal>
			</build>
		</profile>
		<profile>
			<id>deploy-pom-signed</id>
			<build>
				<defaultGoal>
					org.codehaus.mojo:build-helper-maven-plugin:attach-artifact@jenkins
					org.apache.maven.plugins:maven-deploy-plugin:deploy@jenkins
				</defaultGoal>
			</build>
		</profile>
	</profiles>

	<build>
		<resources>
			<resource>
				<directory>${basedir}</directory>
				<targetPath>META-INF</targetPath>
				<includes>
					<include>LICENSE</include>
				</includes>
			</resource>
		</resources>
		<testResources>
			<testResource>
				<directory>src/test/resources</directory>
			</testResource>
		</testResources>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>com.mycila</groupId>
					<artifactId>license-maven-plugin</artifactId>
					<configuration>
						<properties>
							<year>2022</year>
							<owner>Pl4yingNight</owner>
							<email>pl4yingnight@gmail.com</email>
						</properties>
						<licenseSets>
							<licenseSet>
								<header>${root-dir}/src/license/header.txt</header>
								<excludes>
									<exclude>**/.mvn/repo/**</exclude>
									<exclude>**/resources/**</exclude>
									<exclude>**/license/**</exclude>
									<exclude>**/target/**</exclude>
								</excludes>
							</licenseSet>
						</licenseSets>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>
</project>