<?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/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<groupId>fr.mines-stetienne.ci.sparql-generate</groupId>
	<artifactId>sparql-generate-parent</artifactId>
	<version>2.0.4</version>
	<packaging>pom</packaging>

	<name>SPARQL-Generate-Parent</name>
	<description>The parent project for SPARQL-Generate</description>
	<url>https://ci.mines-stetienne.fr/sparql-generate/</url>
	<inceptionYear>2016</inceptionYear>

	<modules>
		<module>../sparql-generate-jena</module>
		<module>../sparql-generate-csv</module>
		<module>../sparql-generate-geojson</module>
		<module>../sparql-generate-json</module>
		<module>../sparql-generate-mqtt</module>
		<module>../sparql-generate-ws</module>
		<module>../sparql-generate-xml</module>
		<module>../sparql-generate-markdown</module>
		<module>../sparql-generate-sql</module>
		<module>../sparql-generate-server</module>
		<module>../sparql-generate-webapis</module>
		<module>../sparql-generate-all</module>
	</modules>

	<developers>
		<developer>
			<name>Maxime Lefrançois</name>
			<email>maxime.lefrancois@emse.fr</email>
			<url>http://maxime-lefrancois.info/</url>
			<organization>MINES Saint-Étienne</organization>
			<organizationUrl>http://www.mines-stetienne.fr/</organizationUrl>
			<timezone>+1</timezone>
			<properties>
				<picUrl>http://gravatar.com/userimage/102097381/dac8aeb15edac9a93e09a7974743957f</picUrl>
			</properties>
		</developer>
	</developers>

	<organization>
		<name>MINES Saint-Étienne</name>
		<url>http://www.mines-stetienne.fr/</url>
	</organization>

	<scm>
		<url>https://github.com/sparql-generate/sparql-generate</url>
	</scm>
	
	<issueManagement>
		<system>GitHub Issues</system>
		<url>http://github.com/sparql-generate/sparql-generate/issues</url>
	</issueManagement>

	<licenses>
		<license>
			<name>The Apache Software License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
		</license>
	</licenses>

	<distributionManagement>
		<snapshotRepository>
			<id>ossrh</id>
			<name>Sonatype Nexus Snapshots</name>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
	</distributionManagement>

	<properties>
		<maven.compiler.source>1.8</maven.compiler.source>
		<maven.compiler.target>1.8</maven.compiler.target>
		<maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ssZ</maven.build.timestamp.format>
		<jdk.version>1.8</jdk.version>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<skip>false</skip>
	</properties>

	<dependencies>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.13.1</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.hamcrest</groupId>
			<artifactId>hamcrest-core</artifactId>
			<version>1.3</version>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<pluginManagement>
			<plugins>
				<!-- ======================== -->
				<!-- DEFAULT LIFECYCLE -->
				<!-- ======================== -->
				<!-- configure validate -->
				<plugin>
					<groupId>org.apache.rat</groupId>
					<artifactId>apache-rat-plugin</artifactId>
					<version>0.11</version>
					<executions>
						<execution>
							<id>rat-checks</id>
							<phase>validate</phase>
							<goals>
								<goal>check</goal>
							</goals>
						</execution>
					</executions>
					<configuration>
						<skip>${skip}</skip>
						<excludeSubProjects>true</excludeSubProjects>
						<excludes>
							<exclude>sparql-generate-server/paho*</exclude>
							<exclude>nbproject/**/*.*</exclude>
							<exclude>**/*.sh</exclude>
							<exclude>**/pom.xml</exclude>
							<exclude>**/beans.xml</exclude>
							<exclude>**/glassfish-web.xml</exclude>
							<exclude>**/web.xml</exclude>
							<exclude>**/src/site/**/*.*</exclude>
							<exclude>**/src/main/resources/**/*.json</exclude>
							<exclude>**/src/main/resources/**/*.geojson</exclude>
							<exclude>**/*.js</exclude>
							<exclude>**/*.rqg</exclude>
							<exclude>**/src/main/**/*.html</exclude>
							<exclude>**/src/test/**/*.*</exclude>
							<exclude>**/src/**/package-info.java</exclude>
							<exclude>**/*.txt</exclude>
							<exclude>**/nb-configuration.xml</exclude>
							<exclude>**/nbactions.xml</exclude>
							<exclude>**/README.md</exclude>
							<exclude>**/nbproject/*</exclude>
							<exclude>**/log4j.properties</exclude>
							<exclude>**/*.classpath</exclude>
							<exclude>**/target/**/*</exclude>
							<exclude>**/dependency-reduced-pom.xml</exclude>
							<exclude>**/pom.xml.versionsBackup</exclude>
							<exclude>**/pom.xml.releaseBackup</exclude>
							<exclude>**/*.csv</exclude>
							<exclude>**/*.rqg</exclude>
							<exclude>**/*.ttl</exclude>
							<exclude>**/*.xml</exclude>
							<exclude>**/*.log</exclude>
							<exclude>**/java.nio.file.spi.FileTypeDetector</exclude>
							<exclude>**/fr.mines_stetienne.ci.sparql_generate.iterator.IteratorFunctionLoader</exclude>
							<exclude>**/fr.mines_stetienne.ci.sparql_generate.function.FunctionLoader</exclude>
							<exclude>**/*.out</exclude>
							<exclude>**/*.rqglog</exclude>
							<exclude>**/*.launch</exclude>
						</excludes>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-enforcer-plugin</artifactId>
					<version>3.0.0-M2</version>
					<executions>
						<execution>
							<id>enforce-maven</id>
							<goals>
								<goal>enforce</goal>
							</goals>
							<configuration>
								<rules>
									<requireMavenVersion>
										<version>3.5</version>
									</requireMavenVersion>
								</rules>
							</configuration>
						</execution>
					</executions>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>3.8.1</version>
					<configuration>
						<source>1.8</source>
						<target>1.8</target>
					</configuration>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-source-plugin</artifactId>
					<version>3.0.0</version>
					<configuration>
						<skip>${skip}</skip>
					</configuration>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>3.1.0</version>
					<configuration>
						<failOnError>false</failOnError>
						<links>
							<link>https://jena.apache.org/documentation/javadoc/arq/</link>
							<link>https://jena.apache.org/documentation/javadoc/jena/</link>
						</links>
					</configuration>
				</plugin>

				<!-- ======= -->
				<!-- PACKAGE -->
				<!-- ======= -->
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-shade-plugin</artifactId>
					<version>2.4.1</version>
					<executions>
						<execution>
							<phase>package</phase>
							<goals>
								<goal>shade</goal>
							</goals>
							<configuration>
								<finalName>sparql-generate</finalName>
								<transformers>
									<transformer
										implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
									<transformer
										implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
										<mainClass>fr.mines_stetienne.ci.sparql_generate.cli.SPARQLExtCli
										</mainClass>
									</transformer>
								</transformers>
								<filters>
									<filter>
										<artifact>*:*</artifact>
										<excludes>
											<exclude>META-INF/*.SF</exclude>
											<exclude>META-INF/*.DSA</exclude>
											<exclude>META-INF/*.RSA</exclude>
										</excludes>
									</filter>
								</filters>
							</configuration>
						</execution>
					</executions>
				</plugin>
				<!-- ====== -->
				<!-- DEPLOY -->
				<!-- ====== -->
				<plugin>
					<groupId>org.sonatype.plugins</groupId>
					<artifactId>nexus-staging-maven-plugin</artifactId>
					<version>1.6.8</version>
					<extensions>true</extensions>
					<configuration>
						<serverId>ossrh</serverId>
						<nexusUrl>https://oss.sonatype.org/</nexusUrl>
						<autoReleaseAfterClose>true</autoReleaseAfterClose>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>

		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-enforcer-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.rat</groupId>
				<artifactId>apache-rat-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-shade-plugin</artifactId>
			</plugin>
		</plugins>
	</build>

	<profiles>
		<!-- ======================== -->
		<!-- ENABLED DURING RELEASE -->
		<!-- ======================== -->
		<profile>
			<id>docs</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<executions>
							<execution>
								<id>attach-sources</id>
								<goals>
									<goal>jar-no-fork</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
						<configuration>
							<failOnError>false</failOnError>
							<includeDependencySources>true</includeDependencySources>
							<dependencySourceIncludes>
								<dependencySourceInclude>fr.mines-stetienne.ci.sparql-generate:*</dependencySourceInclude>
							</dependencySourceIncludes>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>deploy</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<executions>
							<execution>
								<id>attach-sources</id>
								<goals>
									<goal>jar-no-fork</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
						<configuration>
							<failOnError>false</failOnError>
							<includeDependencySources>true</includeDependencySources>
							<dependencySourceIncludes>
								<dependencySourceInclude>fr.mines-stetienne.ci.sparql-generate:*</dependencySourceInclude>
							</dependencySourceIncludes>
						</configuration>
					</plugin>
					<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>
									<!-- Prevent `gpg` from using pinentry programs -->
									<gpgArguments>
										<arg>--pinentry-mode</arg>
										<arg>loopback</arg>
									</gpgArguments>
								</configuration>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.sonatype.plugins</groupId>
						<artifactId>nexus-staging-maven-plugin</artifactId>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>skip</id>
			<properties>
				<skip>true</skip>
			</properties>
		</profile>
	</profiles>

</project>