<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>
	<!-- Only used for web-site! The "real" build is done by Gradle. -->

	<groupId>org.subshare</groupId>
	<artifactId>org.subshare.parent</artifactId>
	<version>1.0.1-SNAPSHOT</version>
<!--
	<version>1.0.1</version>
-->

	<packaging>pom</packaging>

	<url>http://subshare.org</url>
	<inceptionYear>2014</inceptionYear>
	<licenses>
		<license>
			<name>GNU Affero General Public License</name>
			<url>http://www.gnu.org/licenses/agpl-3.0-standalone.html</url>
			<distribution>manual</distribution>
		</license>
	</licenses>

	<ciManagement>
		<system>jenkins</system>
		<url>https://codewizards.co/jenkins/job/org.subshare/</url>
	</ciManagement>

	<issueManagement>
		<system>GitHub</system>
		<url>http://subshare.org/tracker</url>
	</issueManagement>

	<properties>
		<subshare.version>${project.version}</subshare.version>
		<subshare_version>${project.version}</subshare_version> <!-- We must not use a '.' in a property used by velocity (for our web-site). -->

		<!-- Always aggregate. -->
		<aggregate>true</aggregate>

		<!-- Everything is UTF-8 (except for files that are specified differently - e.g. properties) -->
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

		<!-- Java version. -->
		<maven.compiler.source>7</maven.compiler.source>
		<maven.compiler.target>7</maven.compiler.target>
	</properties>

	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<artifactId>maven-site-plugin</artifactId>
					<version>3.3</version>
				</plugin>
				<plugin>
					<artifactId>maven-project-info-reports-plugin</artifactId>
					<version>2.9</version>
				</plugin>
			</plugins>
		</pluginManagement>

		<plugins>		
			<plugin>
				<artifactId>maven-site-plugin</artifactId>
				<dependencies>
					<dependency>
						<groupId>org.apache.maven.doxia</groupId>
						<artifactId>doxia-module-markdown</artifactId>
						<version>1.3</version>
					</dependency>
				</dependencies>
				<configuration>
					<locales>en,de</locales>
					<inputencoding>UTF-8</inputencoding>
					<outputencoding>UTF-8</outputencoding>

					<!-- The reportPlugins make no sense at all, because we build with Gradle. We therefore disable them all. --> 					
					<reportPlugins>
						<!-- Suppress reports by this empty 'reportPlugins'-element. -->
					</reportPlugins>
				</configuration>
			</plugin>

<!-- TODO enable this later!
			<plugin>
				<artifactId>maven-dependency-plugin</artifactId>
				<executions>
					<execution>
						<id>copy-binaries</id>
						<phase>site</phase>
						<goals>
							<goal>copy</goal>
						</goals>
						<configuration>
							<artifactItems>
								<artifactItem>
									<groupId>org.subshare</groupId>
									<artifactId>org.subshare.gui</artifactId>
									<version>${project.version}</version>
									<type>tar.gz</type>
									<classifier>bin</classifier>
									<overWrite>true</overWrite>
									<outputDirectory>${project.build.directory}/site/download</outputDirectory>
								</artifactItem>
								<artifactItem>
									<groupId>org.subshare</groupId>
									<artifactId>org.subshare.gui</artifactId>
									<version>${project.version}</version>
									<type>zip</type>
									<classifier>bin</classifier>
									<overWrite>true</overWrite>
									<outputDirectory>${project.build.directory}/site/download</outputDirectory>
								</artifactItem>
								<artifactItem>
									<groupId>org.subshare</groupId>
									<artifactId>org.subshare.server</artifactId>
									<version>${project.version}</version>
									<type>tar.gz</type>
									<classifier>bin</classifier>
									<overWrite>true</overWrite>
									<outputDirectory>${project.build.directory}/site/download</outputDirectory>
								</artifactItem>
								<artifactItem>
									<groupId>org.subshare</groupId>
									<artifactId>org.subshare.server</artifactId>
									<version>${project.version}</version>
									<type>zip</type>
									<classifier>bin</classifier>
									<overWrite>true</overWrite>
									<outputDirectory>${project.build.directory}/site/download</outputDirectory>
								</artifactItem>
							</artifactItems>
						</configuration>
					</execution>
				</executions>
			</plugin>
-->
		</plugins>
	</build>

	<distributionManagement>
		<!--
		We configure this "junk" directory here in order to make Maven upload everything but the
		'co.codewizards.subshare.aggregator' to a directory which doesn't disturb us. I did not yet find out how to prevent
		Maven from uploading the other modules completely. Marco.
		-->
		<site>
			<id>subshare.org</id>
			<url>file:${java.io.tmpdir}/subshare-junk</url>
		</site>
		<!--
		The following properties must be defined in the local ~/.m2/settings.xml to support deployment of the artifacts:
		<activeProfiles>
			<activeProfile>default</activeProfile>
		</activeProfiles>
		<profiles>
			<profile>
				<id>default</id>
				<properties>
					<subshare.repository.id>subshare-repo</subshare.repository.id>
					<subshare.repository.name>CloudStore Repository</subshare.repository.name>
					<subshare.repository.url>file:/srv/www/subshare/maven/release</subshare.repository.url>

					<subshare.snapshotRepository.id>subshare-snapshot-repo</subshare.snapshotRepository.id>
					<subshare.snapshotRepository.name>CloudStore Snapshot Repository</subshare.snapshotRepository.name>
					<subshare.snapshotRepository.url>file:/srv/www/subshare/maven/snapshot</subshare.snapshotRepository.url>
				</properties>
			</profile>
		</profiles>
		-->
		<repository>
			<id>${subshare.repository.id}</id>
			<name>${subshare.repository.name}</name>
			<url>${subshare.repository.url}</url>
		</repository>
		<snapshotRepository>
			<id>${subshare.snapshotRepository.id}</id>
			<name>${subshare.snapshotRepository.name}</name>
			<url>${subshare.snapshotRepository.url}</url>
		</snapshotRepository>
	</distributionManagement>
</project>