<?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>de.engehausen</groupId>
	<artifactId>treemap.build</artifactId>
	<packaging>pom</packaging>
	<version>1.1.2</version>
	<name>TreeMapBuild</name>
	<url>https://github.com/smurf667/treemaplib/</url>
	<description>This project provides a TreeMap widget in separate small modules for Swing, SWT (standalone and Eclipse feature) and JavaScript (at present more of a toy).</description>
	<scm>
		<url>https://github.com/smurf667/treemaplib</url>
		<connection>scm:git:https://github.com/smurf667/treemaplib.git</connection>
		<developerConnection>scm:git:ssh://git@github.com:smurf667/treemaplib.git</developerConnection>
	</scm>
	<developers>
		<developer>
			<id>smurf667</id>
			<name>Jan Engehausen</name>
			<email>smurf667@gmail.com</email>
			<url>https://github.com/smurf667</url>
			<properties>
				<picUrl>https://avatars.githubusercontent.com/u/11485180?v=4</picUrl>
			</properties>
		</developer>
	</developers>
	<licenses>
		<license>
			<name>Eclipse Public License 1.0</name>
			<url>http://www.eclipse.org/legal/epl-v10.html</url>
			<distribution>repo</distribution>
			<comments>The Eclipse Public License (EPL) is an open source software license used by the Eclipse Foundation for its software. It replaces the Common Public License (CPL) and removes certain terms relating to litigations related to patents.</comments>
		</license>
	</licenses>	
	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<swt.version>4.3</swt.version>
		<surefire.version>3.5.3</surefire.version>
		<java.version>17</java.version>
		<maven.compiler.source>${java.version}</maven.compiler.source>
		<maven.compiler.target>${java.version}</maven.compiler.target>
	</properties>
	<modules>
		<module>../treemap.core</module>
		<module>../treemap.examples</module>
		<module>../treemap.svg</module>
		<module>../treemap.swing</module>
		<module>../treemap.swing.examples</module>
		<module>../treemap.swt</module>
		<module>../treemap.swt.examples</module>
		<module>../treemap.eclipse</module>
	</modules>
	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>de.engehausen</groupId>
				<artifactId>treemap.core</artifactId>
				<version>${project.version}</version>
			</dependency>
			<dependency>
				<groupId>de.engehausen</groupId>
				<artifactId>treemap.swing</artifactId>
				<version>${project.version}</version>
			</dependency>
			<dependency>
				<groupId>de.engehausen</groupId>
				<artifactId>treemap.swt</artifactId>
				<version>${project.version}</version>
			</dependency>
			<dependency>
				<groupId>de.engehausen</groupId>
				<artifactId>treemap.examples</artifactId>
				<version>${project.version}</version>
			</dependency>
			<dependency>
				<groupId>junit</groupId>
				<artifactId>junit</artifactId>
				<version>4.13.2</version>
			</dependency>
		</dependencies>
	</dependencyManagement>
	<dependencies>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<scope>test</scope>
		</dependency>
	</dependencies>
	<profiles>
		<profile>
			<id>swt-unix</id>
			<activation>
				<os>
					<family>unix</family>
				</os>
			</activation>
			<properties>
				<swt.artifactId>org.eclipse.swt.gtk.linux.x86_64</swt.artifactId>
				<env>linux</env>
			</properties>
			<dependencyManagement>
				<dependencies>
					<dependency>
						<groupId>org.eclipse.swt</groupId>
						<artifactId>${swt.artifactId}</artifactId>
						<version>${swt.version}</version>
						<optional>true</optional>
					</dependency>
				</dependencies>
			</dependencyManagement>
		</profile>
		<profile>
			<id>swt-mac</id>
			<activation>
				<os>
					<family>mac</family>
				</os>
			</activation>
			<properties>
				<swt.artifactId>org.eclipse.swt.cocoa.macosx.x86_64</swt.artifactId>
				<env>mac</env>
			</properties>
			<dependencyManagement>
				<dependencies>
					<dependency>
						<groupId>org.eclipse.swt</groupId>
						<artifactId>${swt.artifactId}</artifactId>
						<version>${swt.version}</version>
						<optional>true</optional>
					</dependency>
				</dependencies>
			</dependencyManagement>
		</profile>
		<profile>
			<id>swt-windows</id>
			<activation>
				<os>
					<family>windows</family>
				</os>
			</activation>
			<properties>
				<swt.artifactId>org.eclipse.swt.win32.win32.x86_64</swt.artifactId>
				<env>windows</env>
			</properties>
			<dependencyManagement>
				<dependencies>
					<dependency>
						<groupId>org.eclipse.swt</groupId>
						<artifactId>${swt.artifactId}</artifactId>
						<version>${swt.version}</version>
						<optional>true</optional>
					</dependency>
				</dependencies>
			</dependencyManagement>
		</profile>
		<profile>
			<id>deploy-maven-central</id>
			<!-- prerequisites: see https://medium.com/@othmane.outama/step-by-step-publishing-java-libraries-to-maven-central-abf2ffeb04c0
				1) have GPG key and passphrase
				2) gpg.keyname property configured in settings.xml
				3) user and encrypted password for central server in settings.xml

				mvn deploy -Pdeploy-maven-central -DMAVEN_GPG_PASSPHRASE=...
			-->
			<build>
				<plugins>
					<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>
					</plugin>
					<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-gpg-plugin</artifactId>
						<configuration>
							<keyname>${gpg.keyname}</keyname>
							<passphraseEnvName>MAVEN_GPG_PASSPHRASE</passphraseEnvName>
						</configuration>
						<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>
						<extensions>true</extensions>
						<configuration>
							<publishingServerId>central</publishingServerId>
							<autoPublish>true</autoPublish>
							<waitUntil>uploaded</waitUntil>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>3.14.0</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-dependency-plugin</artifactId>
					<version>3.8.1</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-antrun-plugin</artifactId>
					<version>3.1.0</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-jar-plugin</artifactId>
					<version>3.4.2</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-assembly-plugin</artifactId>
					<version>3.4.0</version>
				</plugin>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>build-helper-maven-plugin</artifactId>
					<version>3.4.0</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>${surefire.version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-surefire-report-plugin</artifactId>
					<version>${surefire.version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-site-plugin</artifactId>
					<version>3.9.1</version>
				</plugin>
				<plugin>
					<groupId>org.jacoco</groupId>
					<artifactId>jacoco-maven-plugin</artifactId>
					<version>0.8.13</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>3.11.2</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-source-plugin</artifactId>
					<version>3.3.1</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-gpg-plugin</artifactId>
					<version>3.2.7</version>
				</plugin>
				<plugin>
					<groupId>org.sonatype.central</groupId>
					<artifactId>central-publishing-maven-plugin</artifactId>
					<version>0.7.0</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-pmd-plugin</artifactId>
					<version>3.26.0</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-jxr-plugin</artifactId>
					<version>3.0.0</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-project-info-reports-plugin</artifactId>
					<version>3.1.1</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-install-plugin</artifactId>
					<version>3.1.4</version>
					<configuration>
						<installAtEnd>true</installAtEnd>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-deploy-plugin</artifactId>
					<version>3.1.4</version>
					<configuration>
						<deployAtEnd>true</deployAtEnd>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-site-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-antrun-plugin</artifactId>
				<executions>
					<execution>
						<id>collect-artifacts</id>
						<phase>install</phase>
						<goals>
							<goal>run</goal>
						</goals>
						<configuration>
							<target>
								<copy todir="../treemap.build/target">
									<fileset dir="${project.build.directory}">
										<include name="treemap*jar"/>
										<include name="*site.zip"/>
										<exclude name="*tests.jar"/>
									</fileset>
								</copy>
								<zip update="true"
									destfile="../treemap.build/target/treemaplib_all_${project.version}.zip"
									basedir="${project.build.directory}"
									includes="treemap*jar"
									excludes="*tests.jar" />
							</target>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
				<executions>
					<execution>
						<id>prepare-agent</id>
						<goals>
							<goal>prepare-agent</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
	<reporting>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-report-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-project-info-reports-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-pmd-plugin</artifactId>
				<configuration>
					<targetJdk>${java.version}</targetJdk>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jxr-plugin</artifactId>
			</plugin>
		</plugins>
	</reporting>
</project>
