<!--
  Copyright (C) 2020, exense GmbH
   
  This file is part of STEP
   
  STEP is free software: you can redistribute it and/or modify
  it under the terms of the GNU Affero General Public License as published by
  the Free Software Foundation, either version 3 of the License, or
  (at your option) any later version.
   
  STEP 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 Affero General Public License for more details.
   
  You should have received a copy of the GNU Affero General Public License
  along with STEP.  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>ch.exense.step</groupId>
	<artifactId>step-grid-parent</artifactId>
	<version>2.0.0</version>
	<packaging>pom</packaging>

	<name>Step Grid</name>
	<description>
		Step Grid
	</description>
	<url>http://exense.ch/</url>
	<licenses>
		<license>
			<name>The GNU Affero General Public License 3.0</name>
			<url>http://www.gnu.org/licenses/</url>
		</license>
	</licenses>
	<developers>
		<developer>
			<name>exense Team</name>
			<email>contact@exense.ch</email>
			<organization>exense GmbH</organization>
			<organizationUrl>http://www.exense.ch</organizationUrl>
			<url>http://step.exense.ch</url>
		</developer>
	</developers>
	<scm>
		<connection>scm:git:https://github.com/exense/step-grid/</connection>
		<developerConnection>scm:git:https://github.com/exense/step-grid.git</developerConnection>
		<url>https://github.com/exense/step-grid/</url>
  	</scm>

	<repositories>
		<!-- staging nexus -->
		<repository>
			<id>nexus-staging</id>
			<url>https://nexus-enterprise.exense.ch/repository/staging-maven/</url>
		</repository>
		<!-- private nexus -->
		<repository>
			<id>nexus-exense</id>
			<url>https://nexus-enterprise.exense.ch/repository/exense/</url>
		</repository>
	</repositories>
	
	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<!-- internal dependencies -->
		<step-api.version>1.1.8</step-api.version>
		<exense-commons.version>2.0.0</exense-commons.version>
		<!-- external dependencies -->
		<slf4j.version>1.7.36</slf4j.version>
		<jersey.version>3.0.4</jersey.version>
		<hk2.version>3.0.1</hk2.version>
		<jetty.version>11.0.9</jetty.version>
		<junit.version>4.13.1</junit.version>
		<jackson.version>2.13.3</jackson.version>
		<guava.version>30.1.1-jre</guava.version>
	</properties>

	<modules>
		<module>step-grid-server</module>
		<module>step-grid-client</module>
		<module>step-grid-agent</module>
		<module>step-grid-api</module>
	</modules>

	<dependencies>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>${slf4j.version}</version>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>${junit.version}</version>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-deploy-plugin</artifactId>
				<version>3.0.0-M1</version>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.8.0</version>
				<configuration>
					<source>11</source>
					<target>11</target>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
				<version>0.8.8</version>
				<executions>
					<execution>
						<id>default-prepare-agent</id>
						<goals>
							<goal>prepare-agent</goal>
						</goals>
					</execution>
					<execution>
						<id>default-report</id>
						<goals>
							<goal>report</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.19.1</version>
				<dependencies>
					<dependency>
						<groupId>org.apache.maven.surefire</groupId>
						<artifactId>surefire-junit47</artifactId>
						<version>2.19.1</version>
					</dependency>
				</dependencies>
				<configuration>
					<systemPropertyVariables>
						<logback.configurationFile>${basedir}/../logback-maven.xml</logback.configurationFile>
					</systemPropertyVariables>
				</configuration>
			</plugin>
			<!-- Source -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>3.0.1</version>
				<executions>
					<execution>
						<id>attach-sources</id>
						<goals>
							<goal>jar-no-fork</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<!-- Javadoc -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>3.3.2</version>
				<configuration>
					<header><![CDATA[<meta name='viewport' content='width=device-width, initial-scale=1.0'>]]></header>
					<!-- detectLinks MUST NOT be set to true in a production context, as it derives random domain names
					from package names, then tries to download data from those random URLs. -->
					<detectLinks>false</detectLinks>

					<!-- detectOfflineLinks SHOULD also be set to false, because:  -->
					<!-- a) it cannot generate meaningful links to the javadoc from other projects, anyway -->
					<!-- b) it causes unnecessarily scary ERROR messages at build time  -->
					<detectOfflineLinks>false</detectOfflineLinks>

					<quiet>true</quiet>
					<source>11</source>
					<additionalOptions>
						<additionalOption>-Xdoclint:none</additionalOption>
					</additionalOptions>
				</configuration>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

	<profiles>
		<profile>
			<id>Default</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<!-- Local compilation - no signature -->
		</profile>
		<profile>
			<id>DependencyCheck</id>
			<activation>
				<activeByDefault>false</activeByDefault>
			</activation>
			<!-- Profile use for checking security issues in external dependencies -->
			<build>
				<plugins>
					<plugin>
						<groupId>org.owasp</groupId>
						<artifactId>dependency-check-maven</artifactId>
						<version>7.1.0</version>
						<executions>
							<execution>
								<goals>
									<goal>check</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>DefaultBuild</id>
			<activation>
				<activeByDefault>false</activeByDefault>
			</activation>
			<build>
				<plugins>
					<!-- Signature -->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>1.6</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
								<configuration>
									<gpgArguments>
										<arg>--pinentry-mode</arg>
										<arg>loopback</arg>
									</gpgArguments>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
