<?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>net.bluemind</groupId>
	<artifactId>net.bluemind.global</artifactId>
	<version>5.5.3474</version>
	<packaging>pom</packaging>
	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

		<bm-plugins-version>1.1.22995</bm-plugins-version>
		<bm.metrics.agent>1.40.13117</bm.metrics.agent>
		<docker.devenv.tag>5.5.1957</docker.devenv.tag>
		<target-platform-version>jdk24-24216</target-platform-version>

		<!-- Not to be modified usually -->
		<tycho-version>5.0.2</tycho-version>
		<maven-source-plugin-version>3.3.1</maven-source-plugin-version>
		<maven-clean-plugin-version>3.5.0</maven-clean-plugin-version>
		<jacoco-maven-plugin-version>0.8.13-bm</jacoco-maven-plugin-version>
		<maven-install-plugin-version>3.1.4</maven-install-plugin-version>
		<maven-compiler-plugin-version>3.14.0</maven-compiler-plugin-version>
		<maven-surefire-plugin-version>2.22.2</maven-surefire-plugin-version>
		<maven-javadoc-plugin-version>3.11.3</maven-javadoc-plugin-version>
		<yuicompressor-maven-plugin-version>1.5.1</yuicompressor-maven-plugin-version>
		<maven-enforcer-plugin-version>3.6.1</maven-enforcer-plugin-version>
		<maven-assembly-plugin-version>3.7.1</maven-assembly-plugin-version>
		<maven-antrun-plugin-version>3.1.0</maven-antrun-plugin-version>
		<maven-shade-plugin-version>3.6.0</maven-shade-plugin-version>
		<org-json-version>20230618</org-json-version>
		<xerces-version>2.12.2</xerces-version>
		<junit-version>4.13.2</junit-version>

		<!-- Minimum viable maven version -->
		<maven-minimum-version>3.9.11</maven-minimum-version>

		<!-- webui frontend -->
		<frontend-maven-plugin.version>1.11.2</frontend-maven-plugin.version>
		<frontend-nodejs.version>v18.19.1</frontend-nodejs.version>
		<frontend-yarn.version>v1.22.17</frontend-yarn.version>

		<gwt.version>2.10.0</gwt.version>
		<gwt.memory>768</gwt.memory>
		<maven.test.failure.ignore>true</maven.test.failure.ignore>
		<l10n.list>"en", "fr"</l10n.list>

		<!-- SonarQube -->
		<tycho.testArgLine>-XX:+UseZGC -XX:+UnlockExperimentalVMOptions -XX:+UseCompactObjectHeaders -Djunit.jupiter.execution.timeout.default=2m -Dical4j.validation.relaxed=true -Dio.netty.noPreferDirect=true -XX:-OmitStackTraceInFastThrow --add-modules java.se --add-exports java.base/jdk.internal.ref=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.nio=ALL-UNNAMED --add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.management/sun.management=ALL-UNNAMED --add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED --add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-opens=jdk.compiler/com.sun.tools.javac=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang.invoke=ALL-UNNAMED --sun-misc-unsafe-memory-access=allow -Dnet.bluemind.property.product=junit -Dmmap-pool.base-directory=/tmp/mmap-pool</tycho.testArgLine>
		<sonar.language>java</sonar.language>
		<sonar.coverage.jacoco.xmlReportPaths>${maven.multiModuleProjectDirectory}/sonar/target/site/jacoco-aggregate/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
		<sonar.surefire.reportsPath>../${project.artifactId}.test/target/surefire-reports/</sonar.surefire.reportsPath>
	</properties>
	<repositories>
		<repository>
			<id>caching-central</id>
			<url>https://forge.bluemind.net/caching-proxy/maven/releases</url>
		</repository>
		<repository>
			<id>bluemind-deps</id>
			<layout>p2</layout>
			<url>https://forge.bluemind.net/staging/p2/dependencies/${target-platform-version}/</url>
			<!--<url>file:///Users/tom/git/target-platform-jdk11/bm-platform/target/repository</url>-->
			<!--<url>file:///home/melanie/Documents/DEV/repos/bluemind-all-dev-tests/bm-target-platform-jdk11/bm-platform/target/repository</url>-->
			<!--<url>file:///home/marie/repositories/bm-target-platform/bm-platform/target/repository</url>-->
		</repository>
		<repository>
			<id>nexus-central</id>
			<url>https://forge.bluemind.net/nexus/content/groups/public</url>
			<snapshots>
				<enabled>true</enabled>
				<updatePolicy>daily</updatePolicy>
			</snapshots>
		</repository>
	</repositories>
	<pluginRepositories>
		<pluginRepository>
			<id>caching-central</id>
			<url>https://forge.bluemind.net/caching-proxy/maven/releases</url>
		</pluginRepository>
		<pluginRepository>
			<id>bm-maven-plugins</id>
			<url>https://forge.bluemind.net/nexus/content/repositories/snapshots</url>
			<snapshots>
				<enabled>true</enabled>
				<updatePolicy>daily</updatePolicy>
			</snapshots>
		</pluginRepository>
		<pluginRepository>
			<id>bm-maven-plugins-releases</id>
			<url>https://forge.bluemind.net/nexus/content/repositories/releases</url>
			<snapshots>
				<enabled>true</enabled>
				<updatePolicy>daily</updatePolicy>
			</snapshots>
		</pluginRepository>
	</pluginRepositories>

	<profiles>
		<profile>
			<id>dev-mode</id>
			<properties>
				<l10n.list>"en", "fr"</l10n.list>
			</properties>
		</profile>
		<profile>
			<id>i18n</id>
			<properties>
				<l10n.list>"de", "en", "es", "fr", "hu", "it", "nl", "pl", "ru", "sk","uk", "zh"</l10n.list>
			</properties>
		</profile>
		<profile>
			<id>localp2</id>
			<!-- artifacts built from profile p2 -->
			<repositories>
				<repository>
					<id>bluemind-local-tp</id>
					<layout>p2</layout>
					<url>file://${localp2repository}</url>
				</repository>
				<repository>
					<id>bluemind-local-tp-closed</id>
					<layout>p2</layout>
					<url>file://${localp2repositoryclosed}</url>
				</repository>
			</repositories>
		</profile>
		<profile>
			<id>gwt-default</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<properties>
				<gwt.draft>false</gwt.draft>
				<gwt.style>OBFUSCATED</gwt.style>
				<gwt.optimize>6</gwt.optimize>
			</properties>
		</profile>
		<profile>
			<id>coverage</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.jacoco</groupId>
						<artifactId>jacoco-maven-plugin</artifactId>
						<executions>
							<execution>
								<id>prepare-agent</id>
								<goals>
									<goal>prepare-agent</goal>
								</goals>
							</execution>
							<execution>
								<id>report</id>
								<goals>
									<goal>report</goal>
								</goals>
								<configuration>
									<formats>
										<format>XML</format>
									</formats>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>tests</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<properties>
				<skip-tests>true</skip-tests>
			</properties>
			<build>
				<plugins>
					<plugin>
						<groupId>org.eclipse.tycho</groupId>
						<artifactId>tycho-surefire-plugin</artifactId>
						<version>${tycho-version}</version>
						<inherited>true</inherited>
						<configuration>
							<includes>
								<include>**/*TestCase.java</include>
								<include>**/Test*.java</include>
								<include>**/*Test.java</include>
								<include>**/*Tests.java</include>
							</includes>
							<showEclipseLog>false</showEclipseLog>
							<useUIHarness>false</useUIHarness>
							<useUIThread>false</useUIThread>
							<redirectTestOutputToFile>false</redirectTestOutputToFile>
							<failIfNoTests>false</failIfNoTests>
							<product>org.eclipse.platform.ide</product>
							<forkedProcessTimeoutInSeconds>4800</forkedProcessTimeoutInSeconds>
							<rerunFailingTestsCount>3</rerunFailingTestsCount>
							<trimStackTrace>false</trimStackTrace>

							<systemProperties>
								<net.fortuna.ical4j.timezone.cache.impl>net.fortuna.ical4j.util.MapTimeZoneCache</net.fortuna.ical4j.timezone.cache.impl>
							</systemProperties>
						</configuration>
					</plugin>
					<plugin>
						<groupId>net.bluemind</groupId>
						<artifactId>bm-docker-maven-plugin</artifactId>
						<version>${bm-plugins-version}</version>
						<executions>
							<execution>
								<goals>
									<goal>start</goal>
									<goal>stop</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>gwt-draft</id>
			<activation>
				<property>
					<name>env.DRAFT</name>
					<value>true</value>
				</property>
			</activation>
			<properties>
				<gwt.draft>true</gwt.draft>
				<gwt.style>PRETTY</gwt.style>
				<gwt.optimize>0</gwt.optimize>
			</properties>
		</profile>
	</profiles>
	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-enforcer-plugin</artifactId>
				<version>${maven-enforcer-plugin-version}</version>
				<executions>
					<execution>
						<id>enforce-maven</id>
						<goals>
							<goal>enforce</goal>
						</goals>
						<configuration>
							<rules>
								<requireMavenVersion>
									<version>${maven-minimum-version}</version>
								</requireMavenVersion>
							</rules>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.eclipse.tycho</groupId>
				<artifactId>tycho-maven-plugin</artifactId>
				<extensions>true</extensions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
			</plugin>
		</plugins>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-assembly-plugin</artifactId>
					<version>${maven-assembly-plugin-version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-antrun-plugin</artifactId>
					<version>${maven-antrun-plugin-version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-install-plugin</artifactId>
					<version>${maven-install-plugin-version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-shade-plugin</artifactId>
					<version>${maven-shade-plugin-version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>${maven-compiler-plugin-version}</version>
					<configuration>
						<source>25</source>
						<target>25</target>
					</configuration>
					<executions>
						<execution>
							<id>compiletests</id>
							<phase>test-compile</phase>
							<goals>
								<goal>testCompile</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<artifactId>maven-clean-plugin</artifactId>
					<version>${maven-clean-plugin-version}</version>
					<configuration>
						<filesets>
							<fileset>
								<directory>${basedir}/generated</directory>
							</fileset>
						</filesets>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-source-plugin</artifactId>
					<version>${maven-source-plugin-version}</version>
					<executions>
						<execution>
							<id>attach-sources</id>
							<phase>verify</phase>
							<goals>
								<goal>jar-no-fork</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>org.eclipse.tycho</groupId>
					<artifactId>tycho-maven-plugin</artifactId>
					<version>${tycho-version}</version>
					<extensions>true</extensions>
					<configuration>
						<encoding>UTF-8</encoding>
						<source>25</source>
						<target>25</target>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.eclipse.tycho</groupId>
					<artifactId>tycho-packaging-plugin</artifactId>
					<version>${tycho-version}</version>
				</plugin>
				<plugin>
					<groupId>org.eclipse.tycho</groupId>
					<artifactId>tycho-p2-director-plugin</artifactId>
					<version>${tycho-version}</version>
					<configuration>
						<parallel>true</parallel>
					</configuration>
					<executions>
						<execution>
							<id>create-product-distributions</id>
							<goals>
								<goal>materialize-products</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>org.eclipse.tycho</groupId>
					<artifactId>tycho-p2-repository-plugin</artifactId>
					<version>${tycho-version}</version>
				</plugin>
				<plugin>
					<groupId>org.eclipse.tycho</groupId>
					<artifactId>tycho-compiler-plugin</artifactId>
					<version>${tycho-version}</version>
					<configuration>
						<encoding>UTF-8</encoding>
						<annotationProcessors>
							<annotationProcessor>net.bluemind.codegen.processor.MetaModelProcessor</annotationProcessor>
						</annotationProcessors>
						<generatedSourcesDirectory>${basedir}/generated</generatedSourcesDirectory>
						<source>25</source>
						<target>25</target>
						<useProjectSettings>false</useProjectSettings>
					</configuration>
					<dependencies>
						<dependency>
							<groupId>net.bluemind</groupId>
							<artifactId>net.bluemind.codegen.metamodel</artifactId>
							<version>${bm-plugins-version}</version>
							<scope>compile</scope>
						</dependency>
					</dependencies>
				</plugin>
				<plugin>
					<groupId>org.eclipse.tycho</groupId>
					<artifactId>tycho-source-plugin</artifactId>
					<version>${tycho-version}</version>
				</plugin>
				<plugin>
					<groupId>org.jacoco</groupId>
					<artifactId>jacoco-maven-plugin</artifactId>
					<version>${jacoco-maven-plugin-version}</version>
					<configuration>
						<excludes>
							<exclude>net.bluemind.exchange.mapi.codec.oxprops.Pid</exclude>
						</excludes>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>${maven-javadoc-plugin-version}</version>
				</plugin>
				<plugin>
					<groupId>org.eclipse.tycho</groupId>
					<artifactId>target-platform-configuration</artifactId>
					<version>${tycho-version}</version>
					<configuration>
						<executionEnvironment>JavaSE-25</executionEnvironment>
						<environments>
							<environment>
								<os>linux</os>
								<ws>gtk</ws>
								<arch>x86_64</arch>
							</environment>
							<environment>
								<os>win32</os>
								<ws>win32</ws>
								<arch>x86_64</arch>
							</environment>
							<environment>
								<os>macosx</os>
								<ws>cocoa</ws>
								<arch>x86_64</arch>
							</environment>
						</environments>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.eclipse.tycho</groupId>
					<artifactId>tycho-versions-plugin</artifactId>
					<version>${tycho-version}</version>
					<configuration>
						<encoding>UTF-8</encoding>
					</configuration>
				</plugin>
				<plugin>
					<groupId>net.alchim31.maven</groupId>
					<artifactId>yuicompressor-maven-plugin</artifactId>
					<version>${yuicompressor-maven-plugin-version}</version>
					<executions>
						<execution>
							<phase>prepare-package</phase>
							<goals>
								<goal>compress</goal>
							</goals>
						</execution>
					</executions>
					<configuration>
						<gzip>true</gzip>
						<force>true</force>
						<disableOptimizations>true</disableOptimizations>
						<jswarn>false</jswarn>
						<nomunge>true</nomunge>
						<nosuffix>true</nosuffix>
						<outputDirectory>web-resources</outputDirectory>
						<sourceDirectory>web-resources</sourceDirectory>
						<webappDirectory>web-resources</webappDirectory>
					</configuration>
				</plugin>
				<plugin>
					<groupId>net.bluemind</groupId>
					<artifactId>net.bluemind.codegen.php</artifactId>
					<version>${bm-plugins-version}</version>
				</plugin>
				<plugin>
					<groupId>net.bluemind</groupId>
					<artifactId>net.bluemind.codegen.gwt</artifactId>
					<version>${bm-plugins-version}</version>
				</plugin>
				<plugin>
					<groupId>net.bluemind</groupId>
					<artifactId>net.bluemind.codegen.js</artifactId>
					<version>${bm-plugins-version}</version>
				</plugin>
				<plugin>
					<groupId>net.bluemind</groupId>
					<artifactId>net.bluemind.codegen.closure</artifactId>
					<version>${bm-plugins-version}</version>
				</plugin>
				<plugin>
					<groupId>net.bluemind</groupId>
					<artifactId>net.bluemind.codegen.csharp</artifactId>
					<version>${bm-plugins-version}</version>
				</plugin>
				<plugin>
					<groupId>net.bluemind</groupId>
					<artifactId>net.bluemind.codegen.moz.js</artifactId>
					<version>${bm-plugins-version}</version>
				</plugin>
				<plugin>
					<groupId>net.bluemind</groupId>
					<artifactId>net.bluemind.codegen.doc</artifactId>
					<version>${bm-plugins-version}</version>
				</plugin>
				<plugin>
					<groupId>net.bluemind</groupId>
					<artifactId>net.bluemind.codegen.python</artifactId>
					<version>${bm-plugins-version}</version>
				</plugin>
				<plugin>
					<groupId>net.bluemind</groupId>
					<artifactId>bm-plovr-maven-plugin</artifactId>
					<version>${bm-plugins-version}</version>
				</plugin>
				<plugin>
					<groupId>net.bluemind</groupId>
					<artifactId>bm-packaging-maven-plugin</artifactId>
					<version>${bm-plugins-version}</version>
				</plugin>
				<plugin>
					<groupId>net.bluemind</groupId>
					<artifactId>bm-upgrader-collector</artifactId>
					<version>${bm-plugins-version}</version>
				</plugin>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>gwt-maven-plugin</artifactId>
					<version>${gwt.version}</version>
					<configuration>
						<extraJvmArgs>-Xmx${gwt.memory}M</extraJvmArgs>
					</configuration>
					<executions>
						<execution>
							<goals>
								<goal>compile</goal>
							</goals>
							<configuration>
								<draftCompile>${gwt.draft}</draftCompile>
								<optimize>${gwt.optimize}</optimize>
								<style>PRETTY</style>
								<inplace>true</inplace>
								<generateJsInteropExports>true</generateJsInteropExports>
								<warSourceDirectory>web-resources</warSourceDirectory>
								<localWorkers>1</localWorkers>
								<logLevel>INFO</logLevel>
								<sourceLevel>11</sourceLevel>
								<collapse-all-properties/>
							</configuration>
						</execution>
					</executions>
					<dependencies>
						<dependency>
							<groupId>com.google.gwt</groupId>
							<artifactId>gwt-user</artifactId>
							<version>${gwt.version}</version>
						</dependency>
						<dependency>
							<groupId>com.google.gwt</groupId>
							<artifactId>gwt-dev</artifactId>
							<version>${gwt.version}</version>
						</dependency>
						<dependency>
							<groupId>com.google.gwt</groupId>
							<artifactId>gwt-codeserver</artifactId>
							<version>${gwt.version}</version>
						</dependency>

						<dependency>
							<groupId>org.json</groupId>
							<artifactId>json</artifactId>
							<version>${org-json-version}</version>
						</dependency>
						<dependency>
							<groupId>xerces</groupId>
							<artifactId>xercesImpl</artifactId>
							<version>${xerces-version}</version>
						</dependency>
					</dependencies>
				</plugin>
				<plugin>
					<groupId>com.github.eirslett</groupId>
					<artifactId>frontend-maven-plugin</artifactId>
					<version>${frontend-maven-plugin.version}</version>

					<configuration>
						<nodeDownloadRoot>https://forge.bluemind.net/nexus/repository/releases/bluemind-dependencies/node/</nodeDownloadRoot>
						<yarnDownloadRoot>https://forge.bluemind.net/nexus/repository/releases/bluemind-dependencies/yarn/</yarnDownloadRoot>
					</configuration>

					<executions>
						<execution>
							<id>Install JS build tools</id>
							<goals>
								<goal>install-node-and-yarn</goal>
							</goals>
							<configuration>
								<nodeVersion>${frontend-nodejs.version}</nodeVersion>
								<yarnVersion>${frontend-yarn.version}</yarnVersion>
							</configuration>
						</execution>
						<execution>
							<id>Install JS dependencies</id>
							<goals>
								<goal>yarn</goal>
							</goals>
							<configuration>
								<arguments>--mutex file:/tmp/.yarn-mutex</arguments>
							</configuration>
						</execution>
						<execution>
							<id>Build JS resources</id>
							<goals>
								<goal>yarn</goal>
							</goals>
							<phase>generate-resources</phase>
							<configuration>
								<arguments>run build</arguments>
							</configuration>
						</execution>
					</executions>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>
	<dependencies>
		<dependency>
			<groupId>org.junit.vintage</groupId>
			<artifactId>junit-vintage-engine</artifactId>
			<version>5.12.2</version>
			<scope>test</scope>
		</dependency>
		<!-- require for junit5 tests to be discovered by maven surefire plugins -->
		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter-engine</artifactId>
			<version>5.12.2</version>
			<scope>test</scope>
		</dependency>
	</dependencies>
</project>
