<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (C) 2007-2022 Crafter Software Corporation. All Rights Reserved.
  ~
  ~ This program is free software: you can redistribute it and/or modify
  ~ it under the terms of the GNU General Public License version 3 as published by
  ~ the Free Software Foundation.
  ~
  ~ This program is distributed in the hope that it will be useful,
  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  ~ GNU General Public License for more details.
  ~
  ~ You should have received a copy of the GNU General Public License
  ~ along with this program.  If not, see <http://www.gnu.org/licenses/>.
  -->

<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>org.craftercms</groupId>
	<artifactId>craftercms-spring-boot</artifactId>
	<version>4.2.2</version><!-- craftercms version flag -->

	<name>CrafterCMS - Springboot</name>
	<description>CrafterCMS Parent POM - Springboot</description>
	<packaging>pom</packaging>
	<url>https://craftercms.org</url>

	<organization>
		<name>CrafterCMS</name>
		<url>https://craftercms.org</url>
	</organization>

	<licenses>
		<license>
			<name>GNU GENERAL PUBLIC LICENSE, Version 3</name>
			<url>http://www.gnu.org/licenses/gpl-3.0.html</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<developers>
	        <developer>
        	    <id>sumerjabri</id>
	            <name>Sumer Jabri</name>
	            <email>sumer.jabri@craftercms.org</email>
	        </developer>
	</developers>

	<scm>
		<connection>scm:git:git://github.com/craftercms/craftercms</connection>
		<developerConnection>scm:git:git://github.com/craftercms/craftercms</developerConnection>
		<url>scm:git:git://github.com/craftercms/craftercms</url>
	</scm>

	<parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>3.4.1</version>
		<relativePath/> <!-- lookup parent from repository -->
	</parent>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

		<!-- Version Numbers -->
		<tomcat.version>10.1.34</tomcat.version>
		<java.version>21</java.version>
		<handlebars.version>4.4.0</handlebars.version>
		<script.security.version>${project.version}</script.security.version>
		<jakarta.json.version>2.0.1</jakarta.json.version>
		<spring-boot.version>3.4.1</spring-boot.version>

		<!-- Override property setup by Spring Boot Parent -->

		<!-- Testing -->

		<!-- build -->
		<maven-javadoc-plugin.version>3.11.1</maven-javadoc-plugin.version>
		<maven-source-plugin.version>3.3.1</maven-source-plugin.version>
		<maven-deploy-plugin.version>3.1.3</maven-deploy-plugin.version>
		<maven-gpg-plugin.version>3.2.7</maven-gpg-plugin.version>
		<buildnumber-maven-plugin.version>3.2.1</buildnumber-maven-plugin.version>
		<nexus-staging-maven-plugin.version>1.7.0</nexus-staging-maven-plugin.version>
		<cyclonedx-maven-plugin.version>2.9.1</cyclonedx-maven-plugin.version>
	</properties>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-starter-web</artifactId>
				<version>${spring-boot.version}</version>
				<exclusions><!-- exclude because it breaks things -->
					<exclusion>
						<groupId>org.springframework.boot</groupId>
						<artifactId>spring-boot-starter-logging</artifactId>
					</exclusion>
				</exclusions>
			</dependency>
			<dependency>
				<groupId>org.craftercms</groupId>
				<artifactId>shared-dependencies</artifactId>
				<version>${project.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
			<dependency>
				<groupId>org.glassfish</groupId>
				<artifactId>jakarta.json</artifactId>
				<version>${jakarta.json.version}</version>
			</dependency>
			<dependency>
				<groupId>com.github.jknack</groupId>
				<artifactId>handlebars</artifactId>
				<version>${handlebars.version}</version>
			</dependency>
			<dependency>
				<groupId>com.github.jknack</groupId>
				<artifactId>handlebars-springmvc</artifactId>
				<version>${handlebars.version}</version>
			</dependency>
		</dependencies>
	</dependencyManagement>
	<build>
		<pluginManagement>
			<plugins>
				<!-- JavaDoc Plugins -->
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>${maven-javadoc-plugin.version}</version>
					<executions>
						<execution>
							<id>validate</id>
							<goals>
								<goal>jar</goal>
							</goals>
						</execution>
						<execution>
							<id>attach-javadocs</id>
							<goals>
								<goal>jar</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>org.cyclonedx</groupId>
					<artifactId>cyclonedx-maven-plugin</artifactId>
					<version>${cyclonedx-maven-plugin.version}</version>
					<configuration>
						<projectType>application</projectType>
						<schemaVersion>1.4</schemaVersion>
						<includeBomSerialNumber>true</includeBomSerialNumber>
						<includeCompileScope>true</includeCompileScope>
						<includeProvidedScope>true</includeProvidedScope>
						<includeRuntimeScope>true</includeRuntimeScope>
						<includeSystemScope>true</includeSystemScope>
						<includeTestScope>false</includeTestScope>
						<includeLicenseText>false</includeLicenseText>
						<outputReactorProjects>true</outputReactorProjects>
						<outputFormat>all</outputFormat>
						<outputName>bom</outputName>
						<outputDirectory>${project.build.directory}</outputDirectory><!-- usually target, if not redefined in pom.xml -->
						<verbose>false</verbose><!-- = ${cyclonedx.verbose} -->
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>

	<profiles>
		<profile>
			<id>full-build</id>
			<activation>
				<property>
					<name>!release</name>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-compiler-plugin</artifactId>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-war-plugin</artifactId>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-resources-plugin</artifactId>
					</plugin>
					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>buildnumber-maven-plugin</artifactId>
						<version>${buildnumber-maven-plugin.version}</version>
					</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</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>javadoc</id>
			<activation>
				<property>
					<name>javadoc</name>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>release-sign-artifacts</id>
			<activation>
				<property>
					<name>release</name>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-deploy-plugin</artifactId>
						<version>${maven-deploy-plugin.version}</version>
						<configuration>
							<skip>true</skip>
						</configuration>
					</plugin>
					<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>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.sonatype.plugins</groupId>
						<artifactId>nexus-staging-maven-plugin</artifactId>
						<version>${nexus-staging-maven-plugin.version}</version>
						<executions>
							<execution>
								<id>default-deploy</id>
								<phase>deploy</phase>
								<goals>
									<goal>deploy</goal>
								</goals>
							</execution>
						</executions>
						<configuration>
							<serverId>sonatype-staging</serverId>
							<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
							<autoReleaseAfterClose>true</autoReleaseAfterClose>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

	<repositories>
		<repository>
			<id>sonatype-snapshots</id>
			<name>Sonatype Snapshot Repository</name>
			<url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
			<releases>
				<enabled>false</enabled>
			</releases>
			<snapshots>
				<enabled>true</enabled>
				<updatePolicy>always</updatePolicy>
				<checksumPolicy>fail</checksumPolicy>
			</snapshots>
		</repository>
	</repositories>

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