<?xml version="1.0" encoding="UTF-8"?>
<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>io.vertigo</groupId>
	<artifactId>vertigo-parent</artifactId>
	<version>4.3.2</version>
	<packaging>pom</packaging>
	<name>vertigo-parent</name>
	<description>Vertigo is a simple java project starter</description>
	<url>https://github.com/vertigo-io/vertigo</url>

	<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>

	<developers>
		<developer>
			<id>phlppchrtn</id>
			<name>philippe chretien</name>
			<email>philippe dot chretien at kleegroup dot com</email>
		</developer>
		<developer>
			<id>NPi2Loup</id>
			<name>Nicolas Piedeloup</name>
			<email>nicolas dot piedeloup at kleegroup dot com</email>
		</developer>
		<developer>
			<id>mlaroche</id>
			<name>Matthieu Laroche</name>
			<email>matthieu dot laroche at ovomnia dot io</email>
		</developer>
		<developer>
			<id>skerdudou</id>
			<name>Steven Kerdudou</name>
			<email>steven dot kerdudou at kleegroup dot com</email>
		</developer>
	</developers>

	<scm>
		<connection>scm:git:https://github.com/vertigo-io/vertigo-core.git</connection>
		<developerConnection>scm:git:https://github.com/vertigo-io/vertigo-core.git</developerConnection>
		<url>scm:git:https://github.com/vertigo-io/vertigo-core.git</url>
		<tag>vertigo-4.3.2</tag>
	</scm>

	

	<properties>
		<maven.compiler.source>17</maven.compiler.source>
		<maven.compiler.target>17</maven.compiler.target>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<vertigo.version>4.3.2</vertigo.version>
	</properties>

	<dependencies>
		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter-engine</artifactId>
			<version>5.13.1</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter-api</artifactId>
			<version>5.13.1</version>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<resources>
			<resource>
				<directory>src/main/java</directory>
				<excludes>
					<exclude>*.java</exclude>
				</excludes>
			</resource>
			<resource>
				<directory>src/main/resources</directory>
			</resource>
		</resources>

		<testResources>
			<testResource>
				<directory>src/test/java</directory>
				<excludes>
					<exclude>*.java</exclude>
				</excludes>
			</testResource>
			<testResource>
				<directory>src/test/resources</directory>
				<excludes>
					<exclude>**/trash/**</exclude>
				</excludes>
			</testResource>
		</testResources>
		<!-- To define the plugin version in your parent POM -->
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>3.11.0</version>
				</plugin>
			</plugins>
		</pluginManagement>
		<!-- To use the plugin goals in your POM or parent POM -->
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>3.1.2</version>
				<configuration>
					<testFailureIgnore>true</testFailureIgnore>
					<junitArtifactName>junit:junit</junitArtifactName>
					<encoding>${project.build.sourceEncoding}</encoding>
					<inputEncoding>${project.build.sourceEncoding}</inputEncoding>
					<outputEncoding>${project.build.sourceEncoding}</outputEncoding>
				</configuration>
			</plugin>
			<plugin>
				<!-- We need a test jar too -->
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<version>3.3.0</version>
				<configuration>
					<forceCreation>true</forceCreation>
					<skipIfEmpty>true</skipIfEmpty>
				</configuration>
			</plugin>
			<plugin><!-- license:format -->
				<groupId>com.mycila</groupId>
				<artifactId>license-maven-plugin</artifactId>
				<version>4.2</version>
				<configuration>
					<header>license.txt</header>
					<includes>
						<include>**/*.java</include>
					</includes>
				</configuration>
				<!-- executions> <execution> <phase>package</phase> <goals> <goal>license</goal> 
					</goals> </execution> </executions -->
			</plugin>
			<plugin>
			  <groupId>org.apache.maven.plugins</groupId>
			  <artifactId>maven-deploy-plugin</artifactId>
			  <version>3.1.1</version> <!-- obligatoire pour permettre <skip> -->
			  <configuration>
			    <skip>true</skip>
			  </configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
				<version>3.0.1</version>
				<configuration>
					<releaseProfiles>release</releaseProfiles>
				</configuration>
				<dependencies>
					<dependency>
						<groupId>org.apache.maven.scm</groupId>
						<artifactId>maven-scm-provider-gitexe</artifactId>
						<version>2.0.1</version>
					</dependency>
					<dependency>
						<groupId>org.apache.maven.scm</groupId>
						<artifactId>maven-scm-api</artifactId>
						<version>2.0.1</version>
					</dependency>
				</dependencies>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>3.5.0</version>
				<configuration>
					<doclint>none</doclint>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-gpg-plugin</artifactId>
				<version>3.1.0</version>
				<executions>
					<execution>
						<id>sign-artifacts</id>
						<phase>verify</phase>
						<goals>
							<goal>sign</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
		          <groupId>org.sonatype.central</groupId>
		          <artifactId>central-publishing-maven-plugin</artifactId>
		          <version>0.8.0</version>
		          <extensions>true</extensions>
		          <executions>
				    <execution>
				      <id>central-publish</id>
				      <phase>deploy</phase>
				      <goals><goal>publish</goal></goals>
				    </execution>
				  </executions>
		          <configuration>
		             <publishingServerId>central</publishingServerId>
		             <autoPublish>true</autoPublish>
		          </configuration>
		        </plugin>
		</plugins>

	</build>
	<profiles>
		<profile>
			<id>release</id>
			<activation>
				<property>
					<name>performRelease</name>
					<value>true</value>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin><!--Config pour déployer les sources et la javadoc :http://stackoverflow.com/questions/4725668/how-to-deploy-snapshot-with-sources-and-javadoc -->
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<version>3.3.0</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.5.0</version>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>3.1.0</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>					
				
				</plugins>
			</build>
		</profile>
		<profile>
			<id>jenkins</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.owasp</groupId>
						<artifactId>dependency-check-maven</artifactId>
						<version>12.1.0</version>
						<executions>
							<execution>
								<goals>
									<goal>check</goal>
								</goals>
							</execution>
						</executions>
						<configuration>
							<!-- update will be done in a dedicated task -->
							<autoUpdate>true</autoUpdate>
							<formats>
								<format>HTML</format>
								<format>JSON</format>
							</formats>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.jacoco</groupId>
						<artifactId>jacoco-maven-plugin</artifactId>
						<version>0.8.12</version>
						<executions>
							<execution>
								<goals>
									<goal>prepare-agent</goal>
								</goals>
							</execution>
							<execution>
								<id>report</id>
								<phase>test</phase>
								<goals>
									<goal>report</goal>
								</goals>
								<configuration>
									<formats>
										<format>XML</format>
									</formats>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>Github</id>
			<distributionManagement>
				<snapshotRepository>
					<id>github</id>
					<name>GitHub Vertigo-io Apache Maven Packages</name>
					<url>https://maven.pkg.github.com/vertigo-io/vertigo-core</url>
				</snapshotRepository>
			</distributionManagement>
		</profile>
		<profile>
			<id>KleeRepo</id>
			<distributionManagement>
				<repository>
					<id>klee-nexus</id>
					<name>KleeGoup nexus Releases Candidate</name>
					<url>http://kleegroup-nexus:8080/nexus/content/repositories/releases/</url>
				</repository>
				<snapshotRepository>
					<id>klee-nexus</id>
					<name>KleeGoup nexus Snapshots</name>
					<url>http://kleegroup-nexus:8080/nexus/content/repositories/snapshots/</url>
				</snapshotRepository>
			</distributionManagement>
			<build>
				<plugins>
					<plugin><!--Config pour déployer les sources -->
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<version>3.3.0</version>
						<executions>
							<execution>
								<id>attach-sources</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
