<?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">


	<!--**************************************************************************
	* POM SECTION: Maven Model Version Settings
	***************************************************************************-->

	<modelVersion>4.0.0</modelVersion>


	<!--**************************************************************************
	* POM SECTION: Maven Settings
	***************************************************************************-->

	<groupId>com.sap.openui5</groupId>
	<artifactId>reactor</artifactId>
	<version>1.108.2</version><!--MainVersion-->
	<packaging>pom</packaging>


	<!--**************************************************************************
	* POM SECTION: Project Settings
	***************************************************************************-->

	<name>OpenUI5</name>
	<description>OpenUI5 - Reactor POM</description>


	<!--**************************************************************************
	* POM SECTION: Modules Settings
	***************************************************************************-->

	<modules>

		<!-- UI libraries -->
		<module>src/sap.ui.core</module>
		<module>src/sap.ui.unified</module>
		<module>src/sap.ui.layout</module>
		<module>src/sap.m</module>
		<module>src/sap.f</module>
		<module>src/sap.ui.commons</module>
		<module>src/sap.ui.table</module>
		<module>src/sap.ui.ux3</module>
		<module>src/sap.ui.suite</module>
		<module>src/sap.ui.documentation</module>
		<module>src/sap.ui.dt</module>
		<module>src/sap.tnt</module>
		<module>src/sap.uxap</module>
		<module>src/sap.ui.fl</module>
		<module>src/sap.ui.mdc</module>
		<module>src/sap.ui.rta</module>
		<module>src/sap.ui.codeeditor</module>
		<module>src/sap.ui.support</module>
		<module>src/sap.ui.integration</module>
		<module>src/sap.ui.testrecorder</module>
		<module>src/sap.ui.webc.main</module>
		<module>src/sap.ui.webc.common</module>
		<module>src/sap.ui.webc.fiori</module>

		<!-- theme libraries -->
		<module>src/themelib_sap_bluecrystal</module>
		<module>src/themelib_sap_belize</module>
		<module>src/themelib_sap_fiori_3</module>
		<module>src/themelib_sap_horizon</module>

		<!-- JSDoc template -->
		<module>lib/jsdoc</module>

	</modules>


	<!--**************************************************************************
	* POM SECTION: Properties Settings
	***************************************************************************-->

	<properties>

		<!-- default encoding is UTF-8 -->
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

		<!-- default compiler level is 1.6 -->
		<maven.compiler.source>1.6</maven.compiler.source>
		<maven.compiler.target>1.6</maven.compiler.target>

		<!-- filtering properties -->
		<version>${project.version}</version>
		<copyright><![CDATA[OpenUI5
 * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
 * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
]]></copyright>
		<buildtime>${maven.build.timestamp}</buildtime>
		<lastchange></lastchange><!-- TODO: fill via build parameter -->

		<!-- JSLint/ESLint report path -->
		<sonar.javascript.jslint.reportPath>target/jslint/jslint.xml</sonar.javascript.jslint.reportPath>

		<!-- Maven build phase in which npm-sources should be packaged	 -->
		<!-- Set to 'package' to enable packaging for a project in general -->
		<npm.package.phase>never</npm.package.phase>

		<!-- internal properties, do not modify -->
		<effective.npm.package.phase>${npm.package.phase}</effective.npm.package.phase>

		<!-- skip eslint validation -->
		<sap.ui5.eslint.skip.validation>true</sap.ui5.eslint.skip.validation>
		<!-- fail on eslint error -->
		<sap.ui5.eslint.failonerror>true</sap.ui5.eslint.failonerror>
		<!-- only validate the changed files -->
		<sap.ui5.eslint.onlyChangedFiles>true</sap.ui5.eslint.onlyChangedFiles>
		<!-- send eslint result as Gerrit inline comment -->
		<sap.ui5.eslint.sendGerritComment>true</sap.ui5.eslint.sendGerritComment>
		<!-- quite or verbose execution -->
		<sap.ui5.eslint.quite>true</sap.ui5.eslint.quite>
		<!-- Eslint tools version -->
		<sap.ui5.eslint.tools.version>0.0.6</sap.ui5.eslint.tools.version>
		<!-- ESLint version (for all OpenUI5 projects) -->
		<sap.openui5.eslintnode.version>7.32.0</sap.openui5.eslintnode.version>
 	</properties>


	<!--**************************************************************************
	* POM SECTION: Build Settings
	***************************************************************************-->

	<build>

		<plugins>

			<!-- specify the delimiters for the filtering -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-resources-plugin</artifactId>
				<version>2.5</version>
				<configuration>
					<!-- list of used binary types (must not be filtered) -->
					<nonFilteredFileExtensions>
						<extension>ttf</extension>
						<extension>eot</extension>
						<extension>gif</extension>
						<extension>png</extension>
						<extension>ico</extension>
						<extension>swf</extension>
						<extension>wav</extension>
						<extension>properties</extension><!-- excluded as those files don't use UTF-8 encoding and as no filtering is needed -->
						<extension>woff</extension>
						<extension>woff2</extension>
						<extension>hpb</extension><!-- hyphenation pattern binary (introduced by OSS component 'hyphenopoly') -->
						<extension>wasm</extension><!-- web assembly, compiled binary -->
					</nonFilteredFileExtensions>

					<!--
						With the default delimiter settings, filtering fails for lines with an odd number of delimiter chars
						like in

						  @version @version@

						We therefore disable the defaults and use only ${*}.

					  -->
					<useDefaultDelimiters>false</useDefaultDelimiters>
					<delimiters>
						<delimiter>${*}</delimiter>
					</delimiters>

				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<version>2.3.2</version>
				<executions>
					<execution>
						<id>npm-resources</id>
						<goals>
							<goal>jar</goal>
						</goals>
						<!-- we use the 'phase' as a substitute for the missing 'skip' property of the jar-plugin		   -->
						<!-- for non-library projects and for all builds other than the nightly build, it is set to 'never' -->
						<phase>${effective.npm.package.phase}</phase>
						<configuration>
							<classesDirectory>${project.basedir}</classesDirectory>
							<classifier>npm-resources</classifier>
							<includes>
								<include>package.json</include>
								<include>ui5.yaml</include>
								<include>.dtsgenrc</include>
								<include>src/**/*</include>
								<include>test/**/*</include>
							</includes>
						</configuration>
					</execution>
				</executions>
			</plugin>

		</plugins>

	</build>


	<!--**************************************************************************
	* POM SECTION: Profile Settings
	***************************************************************************-->

	<profiles>

		<!-- attach the LICENSE.txt and THIRDPARTY.txt files -->
		<profile>

			<activation>
				<file>
					<exists>${basedir}/LICENSE.txt</exists>
				</file>
			</activation>

			<build>

				<plugins>

					<!-- attach the LICENSE.txt and THIRDPARTY.txt as separate artifacts -->
					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>build-helper-maven-plugin</artifactId>
						<version>1.9.1</version>
						<executions>
							<execution>
								<id>attach-artifacts</id>
								<phase>package</phase>
								<goals>
									<goal>attach-artifact</goal>
								</goals>
								<configuration>
									<artifacts>
										<artifact>
											<file>${basedir}/LICENSE.txt</file>
											<type>txt</type>
											<classifier>LICENSE</classifier>
										</artifact>
										<artifact>
											<file>${basedir}/THIRDPARTY.txt</file>
											<type>txt</type>
											<classifier>THIRDPARTY</classifier>
										</artifact>
									</artifacts>
								</configuration>
							</execution>
						</executions>
					</plugin>

				</plugins>

			</build>

		</profile>

		<profile>
			<id>eslintnode.build</id>
			<build>
				<plugins>
					<plugin>
						<groupId>com.sap.ui5.tools.maven</groupId>
						<artifactId>eslintnode-maven-plugin</artifactId>
						<version>0.2.3</version>
						<executions>
							<execution>
								<phase>verify</phase>
								<goals>
									<goal>eslint</goal>
								</goals>
							</execution>
						</executions>
						<configuration>
							<version>${sap.openui5.eslintnode.version}</version>
							<nodeType>SHARED</nodeType>
							<nodeVersion>${node.version}</nodeVersion>
							<nodeLocation>${node.location}</nodeLocation>
							<npmRegistry>${npm.registry}</npmRegistry>
							<npmVersion>${npm.version}</npmVersion>
							<formatters>
								<formatter>
									<name>sonar</name>
									<output>${project.build.directory}/jslint/jslint.xml</output>
								</formatter>
							</formatters>
							<failOnError>${sap.ui5.eslint.failonerror}</failOnError>
							<onlyChangedFiles>${sap.ui5.eslint.onlyChangedFiles}</onlyChangedFiles>
							<sendGerritComment>${sap.ui5.eslint.sendGerritComment}</sendGerritComment>
							<eslintToolsVersion>${sap.ui5.eslint.tools.version}</eslintToolsVersion>
							<quiet>${sap.ui5.eslint.quite}</quiet>
							<skip>${sap.ui5.eslint.skip.validation}</skip>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>

		<profile>

			<id>nightly.build</id>

			<activation>
				<property>
					<name>ldi.releaseBuild</name>
				</property>
			</activation>

			<properties>

				<!-- validate all files for the nightly build (attention: profile nightly.build must stay after eslint.build!) -->
				<sap.ui5.eslint.onlyChangedFiles>false</sap.ui5.eslint.onlyChangedFiles>
				<!-- don't send Gerrit comment in nightly build -->
				<sap.ui5.eslint.sendGerritComment>false</sap.ui5.eslint.sendGerritComment>
			</properties>

		</profile>

		<profile>
			<id>testsuite.build</id>

			<activation>
				<activeByDefault>true</activeByDefault>
				<property>
					<name>ui5workspace</name>
				</property>
			</activation>

			<modules>

				<!-- testsuite -->
				<module>src/testsuite-utils</module>
				<module>src/testsuite</module>

			</modules>

		</profile>

	</profiles>

</project>
