<!--

    =======================================================================

    Copyright (c) 2010-2020 SAP and others.
    All rights reserved. This program and the accompanying materials
    are made available under the terms of the Eclipse Public License v2.0
    which accompanies this distribution, and is available at
    http://www.eclipse.org/legal/epl-v20.html

    Contributors:
      SAP - initial API and implementation

	=======================================================================

	Standard build:
		mvn clean install

	Build without tests:
		mvn clean install -DskipTests

	Build without compiling tests:
		mvn clean install -Dmaven.test.skip=true

	Build with threads:
		mvn -T 1C clean install

	Build without javadoc:
		mvn clean install -Dmaven.javadoc.skip=true

	Do a fast build:
		mvn -T 1C clean install -Dmaven.test.skip=true -DskipTests
-Dmaven.javadoc.skip=true

	Update the years in the license header:
		mvn license:format -P license

	Update the version:
		mvn versions:set -DnewVersion=3.3.1-SNAPSHOT

	Generate Javadoc:
		mvn javadoc:javadoc

	Reuse tool check
		python3 -m reuse lint

	Upload to Maven Central:
		mvn javadoc:jar
		mvn deploy -P release -DskipTests
		
	Tests coverage report generation
		mvn clean -B package -P coverage
		
	Static checks analysis
		mvn clean install -P spotbugs

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

	<parent>
		<groupId>org.sonatype.oss</groupId>
		<artifactId>oss-parent</artifactId>
		<version>9</version>
	</parent>

	<name>Dirigible - Parent</name>
	<description>Dirigible Parent</description>
	<groupId>org.eclipse.dirigible</groupId>
	<artifactId>dirigible-parent</artifactId>
	<version>9.0.0</version>
	<packaging>pom</packaging>

	<inceptionYear>2010</inceptionYear>

	<licenses>
		<license>
			<name>Eclipse Public License - v 2.0</name>
			<url>https://www.eclipse.org/legal/epl-v20.html</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<url>http://www.dirigible.io</url>

	<organization>
		<name>Eclipse Foundation</name>
		<url>http://www.eclipse.org</url>
	</organization>

	<profiles>
		<profile>
			<id>default</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<properties>
				<maven.javadoc.skip>true</maven.javadoc.skip>
			</properties>
			<build>
				<plugins>
					<plugin>
						<groupId>net.revelc.code.formatter</groupId>
						<artifactId>formatter-maven-plugin</artifactId>
						<version>2.23.0</version>
						<configuration>
							<configFile>${formatter.location}</configFile>
							<compilerSource>${formatter.java.version}</compilerSource>
							<compilerCompliance>${formatter.java.version}</compilerCompliance>
							<compilerTargetPlatform>${formatter.java.version}</compilerTargetPlatform>
						</configuration>
						<executions>
							<execution>
								<id>format-java-code</id>
								<phase>process-sources</phase>
								<goals>
									<goal>format</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-compiler-plugin</artifactId>
						<version>${maven.compiler.plugin.version}</version>
						<configuration>
							<source>${maven.compiler.source}</source>
							<target>${maven.compiler.target}</target>
							<debug>true</debug>
							<debuglevel>lines,vars,source</debuglevel>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-surefire-plugin</artifactId>
						<version>${maven-surefire-plugin.version}</version>
						<configuration>
							<argLine>
								--add-opens java.base/java.lang=ALL-UNNAMED
								--add-opens java.base/java.math=ALL-UNNAMED
								--add-opens java.base/java.util=ALL-UNNAMED
								--add-opens
								java.base/java.util.concurrent=ALL-UNNAMED
								--add-opens java.base/java.net=ALL-UNNAMED
								--add-opens java.base/java.text=ALL-UNNAMED
							</argLine>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<version>3.6.3</version>
						<configuration>
							<source>${java.version}</source>
						</configuration>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
						<!-- <configuration>
							<failOnError>false</failOnError>
						</configuration> -->
						<dependencies>
							<dependency>
								<groupId>org.apache.commons</groupId>
								<artifactId>commons-lang3</artifactId>
								<version>${commons.lang3}</version>
							</dependency>
						</dependencies>
					</plugin>
				</plugins>
			</build>
		</profile>

		<profile>
			<id>license</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>com.mycila</groupId>
						<artifactId>license-maven-plugin</artifactId>
						<version>${license-maven-plugin.version}</version>
						<inherited>true</inherited>
						<configuration>
							<header>${license.header.location}</header>
							<aggregate>true</aggregate>
							<properties>
								<inceptionYear>${project.inceptionYear}</inceptionYear>
								<currentYear>${currentYear}</currentYear>
							</properties>
							<includes>
								<include>src/**/*.java</include>
								<include>src/**/*.xml</include>
								<include>src/**/*.js</include>
							</includes>
							<excludes>
								<exclude>**/logback.xml</exclude>
								<exclude>**/logback-test.xml</exclude>
								<exclude>**/src/test/resources/**</exclude>
								<exclude>
									**/src/main/resources/META-INF/dirigible/font-awesome-4.7.0/**</exclude>
								<exclude>
									**/src/main/resources/META-INF/dirigible/font-dirigible/**</exclude>
								<exclude>
									**/src/main/resources/META-INF/dirigible/ide-bpm/**</exclude>
								<exclude>
									**/src/main/resources/META-INF/dirigible/ide-monaco/**</exclude>
								<exclude>
									**/src/main/resources/META-INF/dirigible/ide-swagger/**</exclude>
								<exclude>
									**/src/main/resources/META-INF/dirigible/resources-core/ui/**</exclude>
								<exclude>
									**/src/main/resources/META-INF/dirigible/ide-terminal/js/**</exclude>
								<exclude>
									**/src/main/resources/META-INF/dirigible/dev-tools/**</exclude>
								<exclude>
									**/src/main/resources/META-INF/dirigible/template-mobile-hello-world/node_modules/**</exclude>
								<exclude>
									**/src/main/resources/META-INF/dirigible/utils/jsonpath.js</exclude>
							</excludes>
							<skipExistingHeaders>true</skipExistingHeaders>
						</configuration>
						<dependencies>
							<dependency>
								<groupId>com.mycila</groupId>
								<artifactId>license-maven-plugin-git</artifactId>
								<version>${license-maven-plugin.version}</version>
							</dependency>
						</dependencies>
						<executions>
							<execution>
								<id>format-license</id>
								<phase>initialize</phase>
								<goals>
									<goal>format</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-compiler-plugin</artifactId>
						<version>${maven.compiler.plugin.version}</version>
						<configuration>
							<source>${maven.compiler.source}</source>
							<target>${maven.compiler.target}</target>
							<debug>true</debug>
							<debuglevel>lines,vars,source</debuglevel>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>

		<profile>
			<id>spotbugs</id>
			<activation>
				<activeByDefault>false</activeByDefault>
			</activation>
			<build>
				<plugins>

					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-compiler-plugin</artifactId>
						<version>${maven.compiler.plugin.version}</version>
						<configuration>
							<source>${maven.compiler.source}</source>
							<target>${maven.compiler.target}</target>
							<debug>true</debug>
							<debuglevel>lines,vars,source</debuglevel>
						</configuration>
					</plugin>

					<plugin>
						<groupId>com.github.spotbugs</groupId>
						<artifactId>spotbugs-maven-plugin</artifactId>
						<version>4.8.2.0</version>
						<dependencies>
							<!-- overwrite dependency on spotbugs if you want to
							specify the version of spotbugs -->
							<dependency>
								<groupId>com.github.spotbugs</groupId>
								<artifactId>spotbugs</artifactId>
								<version>4.8.3</version>
							</dependency>
						</dependencies>
					</plugin>

				</plugins>

			</build>
		</profile>

		<profile>
			<id>coverage</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.jacoco</groupId>
						<artifactId>jacoco-maven-plugin</artifactId>
						<version>0.8.11</version>
						<executions>
							<execution>
								<goals>
									<goal>prepare-agent</goal>
								</goals>
							</execution>
							<execution>
								<id>generate-code-coverage-report</id>
								<phase>test</phase>
								<goals>
									<goal>report</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>

		<profile>
			<id>release</id>
			<activation>
				<activeByDefault>false</activeByDefault>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-compiler-plugin</artifactId>
						<version>${maven.compiler.plugin.version}</version>
						<configuration>
							<source>${maven.compiler.source}</source>
							<target>${maven.compiler.target}</target>
							<debug>true</debug>
							<debuglevel>lines,vars,source</debuglevel>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<version>3.3.0</version>
						<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>
						<version>3.6.3</version>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
						<!-- <configuration>
							<failOnError>false</failOnError>
						</configuration> -->
						<dependencies>
							<dependency>
								<groupId>org.apache.commons</groupId>
								<artifactId>commons-lang3</artifactId>
								<version>${commons.lang3}</version>
							</dependency>
						</dependencies>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>3.1.0</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>
				</plugins>
			</build>
		</profile>

	</profiles>

	<repositories>
		<repository>
			<id>ossrh</id>
			<url>https://repo1.maven.org/maven2</url>
			<snapshots>
				<enabled>false</enabled>
			</snapshots>
			<releases>
				<enabled>true</enabled>
			</releases>
		</repository>
	</repositories>

	<pluginRepositories>
		<pluginRepository>
			<id>sonatype-public-repository</id>
			<url>https://oss.sonatype.org/content/groups/public</url>
			<snapshots>
				<enabled>false</enabled>
			</snapshots>
			<releases>
				<enabled>true</enabled>
			</releases>
		</pluginRepository>
	</pluginRepositories>

	<distributionManagement>
		<snapshotRepository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
		<repository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
		</repository>
	</distributionManagement>

	<issueManagement>
		<url>http://bugs.dirigible.io</url>
	</issueManagement>

	<modules>
		<module>modules</module>
		<module>components</module>
		<module>build</module>
		<module>tests</module>
		<module>dependencies</module>
	</modules>

	<dependencies>
		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>javax.servlet-api</artifactId>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>ch.qos.logback</groupId>
			<artifactId>logback-core</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>ch.qos.logback</groupId>
			<artifactId>logback-classic</artifactId>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>com.google.code.gson</groupId>
			<artifactId>gson</artifactId>
		</dependency>
		<dependency>
			<groupId>commons-io</groupId>
			<artifactId>commons-io</artifactId>
			<version>${commons.io}</version>
		</dependency>

		<dependency>
			<groupId>javax.annotation</groupId>
			<artifactId>jsr250-api</artifactId>
			<version>${jsr250-api.version}</version>
		</dependency>

		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-lang3</artifactId>
		</dependency>
		<dependency>
			<groupId>com.fasterxml.jackson.core</groupId>
			<artifactId>jackson-databind</artifactId>
		</dependency>

		<!-- Java 11 Dependencies -->
		<dependency>
			<groupId>javax.xml.bind</groupId>
			<artifactId>jaxb-api</artifactId>
		</dependency>
		<dependency>
			<groupId>com.sun.xml.bind</groupId>
			<artifactId>jaxb-core</artifactId>
			<version>${jaxb.version}</version>
		</dependency>
		<dependency>
			<groupId>com.sun.xml.bind</groupId>
			<artifactId>jaxb-impl</artifactId>
			<version>${jaxb.version}</version>
		</dependency>
		<dependency>
			<groupId>jakarta.xml.ws</groupId>
			<artifactId>jakarta.xml.ws-api</artifactId>
		</dependency>
		<dependency>
			<groupId>com.google.guava</groupId>
			<artifactId>guava</artifactId>
			<version>${guava.version}</version>
		</dependency>
		<dependency>
			<groupId>net.bytebuddy</groupId>
			<artifactId>byte-buddy</artifactId>
			<version>1.14.10</version>
		</dependency>

		<!-- Test Dependencies -->
		<dependency>
			<groupId>com.squareup.okhttp3</groupId>
			<artifactId>okhttp</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>com.squareup.okhttp3</groupId>
			<artifactId>okhttp-urlconnection</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-core</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-inline</artifactId>
			<scope>test</scope>
		</dependency>
		<!-- End Test Dependencies -->
	</dependencies>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>org.eclipse.dirigible</groupId>
				<artifactId>dirigible-application</artifactId>
				<version>${project.version}</version>
			</dependency>
			<dependency>
				<groupId>org.junit.vintage</groupId>
				<artifactId>junit-vintage-engine</artifactId>
				<version>5.10.1</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-dependencies</artifactId>
				<version>${spring.boot.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
			<dependency>
				<groupId>org.seleniumhq.selenium</groupId>
				<artifactId>selenium-java</artifactId>
				<version>4.16.1</version>
				<scope>test</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<properties>
		<project.title>Eclipse Dirigible</project.title>

		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

		<java.version>17</java.version>
		<maven.compiler.source>17</maven.compiler.source>
		<maven.compiler.target>17</maven.compiler.target>

		<maven.resource.plugin.version>3.3.1</maven.resource.plugin.version>
		<maven.compiler.plugin.version>3.11.0</maven.compiler.plugin.version>
		<maven-surefire-plugin.version>3.2.3</maven-surefire-plugin.version>
		<maven.scm.plugin.version>2.0.0</maven.scm.plugin.version>
		<scmVersionType>branch</scmVersionType>
		<commons.io>2.15.1</commons.io>
		<commons.lang3>3.14.0</commons.lang3>
		<commons.exec>1.3</commons.exec>
		<hamcrest.all.version>1.3</hamcrest.all.version>
		<retrofit.version>1.8.0</retrofit.version>
		<commons-dbcp2.version>2.9.0</commons-dbcp2.version>

		<h2database.version>2.2.224</h2database.version>
		<ngdbc.version>2.19.15</ngdbc.version>

		<jsr250-api.version>1.0</jsr250-api.version>
		<lucene.version>9.9.1</lucene.version>
		<chemistry.version>1.1.0</chemistry.version>
		<flowable.version>6.8.0</flowable.version>
		<jaxb.version>2.3.0</jaxb.version>
		<license-maven-plugin.version>4.3</license-maven-plugin.version>
		<persistence.api.version>2.2.3</persistence.api.version>
		<jgit.version>6.8.0.202311291450-r</jgit.version>
		<olingo.version>2.0.13</olingo.version>
		<git-commit-id-plugin.version>4.9.10</git-commit-id-plugin.version>
		<mongodb.version>3.12.14</mongodb.version>
		<liquibase-core.version>4.25.0</liquibase-core.version>
		<commons-csv.version>1.10.0</commons-csv.version>
		<jquery-ui.version>1.13.0</jquery-ui.version>
		<sap-theming__theming-base-content.version>11.7.0</sap-theming__theming-base-content.version>
		<fundamental-styles.version>0.30.2</fundamental-styles.version>
		<angular-aria.version>1.8.2</angular-aria.version>
		<split.js.version>1.6.5</split.js.version>
		<diff.version>5.1.0</diff.version>
		<monaco-editor.version>0.40.0</monaco-editor.version>
		<requirejs.version>2.3.6</requirejs.version>
		<jstree.version>3.3.12</jstree.version>
		<jquery.version>3.6.0</jquery.version>
		<jqplot.version>1.0.8r1250</jqplot.version>
		<webjars.bootstrap.version>5.3.2</webjars.bootstrap.version>
		<webjars.locator.version>0.50</webjars.locator.version>
		<webjars.locator.core.version>0.55</webjars.locator.core.version>
		<es5-shim.version>4.6.7</es5-shim.version>
		<angular-file-upload.version>2.6.1</angular-file-upload.version>
		<angularjs.version>1.8.2</angularjs.version>
		<fontawesome.version>4.7.0</fontawesome.version>
		<classgraph.version>4.8.165</classgraph.version>
		<commons-compress.version>1.22</commons-compress.version>
		<testcontainers.version>1.19.3</testcontainers.version>
		<jetcd.core.version>0.7.6</jetcd.core.version>
		<logcaptor.version>2.9.2</logcaptor.version>
		<exec.maven.plugin>3.1.1</exec.maven.plugin>
		<mina-core.version>2.2.3</mina-core.version>
		<sshd-core.version>2.11.0</sshd-core.version>

		<spring.boot.version>2.7.18</spring.boot.version>

		<keycloak.keycloak-spring-boot-starter>23.0.3</keycloak.keycloak-spring-boot-starter>
		<c3p0.version>0.9.5.5</c3p0.version>
		<graalvm.version>23.1.1</graalvm.version>
		<guava.version>32.1.3-jre</guava.version>
		<icu4j.version>74.2</icu4j.version>
		<velocity.version>2.3</velocity.version>
		<wikitext.version>3.0.48.202308291007</wikitext.version>
		<flexmark.version>0.64.8</flexmark.version>
		<qldb.driver.version>2.3.1</qldb.driver.version>
		<qldb.sdk.version>1.12.620</qldb.sdk.version>
		<camel.version>3.21.2</camel.version>
		<ftpserver.version>1.2.0</ftpserver.version>

		<org.springdoc.openapi.ui.version>1.7.0</org.springdoc.openapi.ui.version>

		<sonar.organization>eclipse</sonar.organization>
		<sonar.host.url>https://sonarcloud.io</sonar.host.url>

		<profile.content.phase>none</profile.content.phase>

		<content.scm.url>
			https://github.com/dirigiblelabs/${content.repository.name}</content.scm.url>
		<content.scm.connection>
			scm:git:https://github.com/dirigiblelabs/${content.repository.name}.git</content.scm.connection>
		<content.scm.developerConnection>
			scm:git:https://github.com/dirigiblelabs/${content.repository.name}</content.scm.developerConnection>
		<content.repository.branch>master</content.repository.branch>

		<content.scm.server>github</content.scm.server>
		<content.scm.checkoutDirectory>target</content.scm.checkoutDirectory>
		<content.source.directory>target/${content.project.name}</content.source.directory>
		<content.output.directory>
			${basedir}/src/main/resources/META-INF/dirigible/${content.project.name}</content.output.directory>

		<license.header.location>licensing-header.txt</license.header.location>

		<parent.pom.folder>./</parent.pom.folder>
		<formatter.location>${parent.pom.folder}/dirigible-formatter.xml</formatter.location>
		<formatter.java.version>${java.version}</formatter.java.version>
	</properties>
</project>

