<!--
/******************************************************************************
 * Vige, Home of Professional Open Source Copyright 2010, Vige, and           *
 * individual contributors by the @authors tag. See the copyright.txt in the  *
 * distribution for a full listing of individual 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.                                             *
 ******************************************************************************/
-->
<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>

	<groupId>it.vige</groupId>
	<artifactId>school</artifactId>
	<version>1.4.0</version>
	<packaging>pom</packaging>
	<name>School Parent</name>
	<description>School Web and Portlet Application Parent Aggregator</description>
	<url>http://www.vige.it</url>

	<organization>
		<name>Vige</name>
		<url>http://www.vige.it</url>
	</organization>
	<licenses>
		<license>
			<name>The Apache Software License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
		</license>
	</licenses>
	<scm>
		<connection>svn:git:https://github.com/flashboss/school.git</connection>
		<developerConnection>svn:git:https://github.com/flashboss/school.git</developerConnection>
		<tag>1.4.0</tag>
		<url>svn:git:https://github.com/flashboss/school.git</url>
	</scm>
	<developers>
		<developer>
			<id>flashboss</id>
			<name>Luca Stancapiano</name>
			<organization>vige</organization>
			<organizationUrl>http://www.vige.it</organizationUrl>
			<url>http://www.vige.it</url>
		</developer>
	</developers>

	<properties>
		<maven.compiler.source>13</maven.compiler.source>
		<maven.compiler.target>13</maven.compiler.target>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<spec.jakartaee.version>8.0.0</spec.jakartaee.version>
		<primefaces.version>7.0</primefaces.version>
		<maven.war.plugin.version>3.2.3</maven.war.plugin.version>
		<maven.ejb.plugin.version>3.0.1</maven.ejb.plugin.version>
		<maven.source.plugin.version>3.2.1</maven.source.plugin.version>
		<maven.javadoc.plugin.version>3.1.1</maven.javadoc.plugin.version>
		<maven.gpg.plugin.version>1.6</maven.gpg.plugin.version>
		<maven.surefire.plugin.version>3.0.0-M4</maven.surefire.plugin.version>
		<maven.replacer.plugin.version>1.5.3</maven.replacer.plugin.version>
		<maven.docker.plugin.version>0.31.0</maven.docker.plugin.version>
		<maven.resources.plugin.version>3.1.0</maven.resources.plugin.version>
		<ejb.version>3.2</ejb.version>
		<wildfly.version>18.0.1.Final</wildfly.version>
		<wildfly.maven.plugin.version>2.0.2.Final</wildfly.maven.plugin.version>
		<jboss.logging.version>3.4.1.Final</jboss.logging.version>
		<resteasy.version>3.9.1.Final</resteasy.version>
		<junit.version>5.5.2</junit.version>
		<keycloak.version>8.0.1</keycloak.version>
	</properties>

	<build>
		<finalName>${project.artifactId}</finalName>
	</build>

	<repositories>
		<repository>
			<id>prime-repo</id>
			<name>PrimeFaces Maven Repository</name>
			<url>http://repository.primefaces.org</url>
			<layout>default</layout>
		</repository>
	</repositories>

	<dependencies>
		<dependency>
			<groupId>jakarta.platform</groupId>
			<artifactId>jakarta.jakartaee-api</artifactId>
			<version>${spec.jakartaee.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.jboss.logging</groupId>
			<artifactId>jboss-logging</artifactId>
			<version>${jboss.logging.version}</version>
			<scope>provided</scope>
		</dependency>
	</dependencies>

	<modules>
		<module>school-commons</module>
		<module>school-keycloak</module>
		<module>school-app</module>
	</modules>

	<profiles>
		<profile>
			<id>release-sign-artifacts</id>
			<activation>
				<property>
					<name>performRelease</name>
					<value>true</value>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<artifactId>maven-source-plugin</artifactId>
						<version>${maven.source.plugin.version}</version>
						<executions>
							<execution>
								<id>attach-sources</id>
								<goals>
									<goal>jar-no-fork</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<artifactId>maven-javadoc-plugin</artifactId>
						<version>${maven.javadoc.plugin.version}</version>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<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>
				</plugins>
			</build>
			<distributionManagement>
				<snapshotRepository>
					<id>oss.sonatype</id>
					<url>https://oss.sonatype.org/content/repositories/snapshots</url>
				</snapshotRepository>
				<repository>
					<id>oss.sonatype</id>
					<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
				</repository>
			</distributionManagement>
		</profile>

		<profile>
			<id>docker-school</id>
			<build>
				<plugins>
					<plugin>
						<groupId>io.fabric8</groupId>
						<artifactId>docker-maven-plugin</artifactId>
						<version>${maven.docker.plugin.version}</version>
						<configuration>
							<images>
								<image>
									<name>vige/school:${project.version}</name>
									<alias>dockerfile</alias>
									<run>
										<ports>
											<port>8080:8080</port>
											<port>8180:8180</port>
										</ports>
									</run>
								</image>
							</images>
						</configuration>
						<executions>
							<execution>
								<inherited>false</inherited>
								<id>start</id>
								<phase>install</phase>
								<goals>
									<goal>build</goal>
									<goal>start</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
