<!--

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

    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

	Synchronize WebJars like content:
		mvn clean install -DskipTests -P content
		mvn clean install -DskipTests

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

	<scm>
		<url>${content.scm.url}</url>
		<connection>${content.scm.connection}</connection>
		<developerConnection>${content.scm.developerConnection}</developerConnection>
	</scm>

	<profiles>
		<profile>
			<id>default</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<properties>
				<maven.javadoc.skip>true</maven.javadoc.skip>
			</properties>
			<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-javadoc-plugin</artifactId>
						<version>3.1.1</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>content</id>
			<activation>
				<activeByDefault>false</activeByDefault>
			</activation>
			<build>
				<finalName>${project.artifactId}</finalName>
				<plugins>
				    <plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-clean-plugin</artifactId>
						<version>${maven.clean.plugin.version}</version>
						<configuration>
							<filesets>
								<fileset>
									<directory>${maven.clean.plugin.directory}</directory>
								</fileset>
							</filesets>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-scm-plugin</artifactId>
						<version>${maven.scm.plugin.version}</version>
						<configuration>
							<goals>checkout</goals>
							<checkoutDirectory>${content.scm.checkoutDirectory}</checkoutDirectory>
							<connectionUrl>${content.scm.connection}</connectionUrl>
							<developerConnectionUrl>${content.scm.developerConnection}</developerConnectionUrl>
							<server>${content.scm.server}</server>
							<scmVersion>${content.repository.branch}</scmVersion>
							<scmVersionType>branch</scmVersionType>
						</configuration>
						<executions>
							<execution>
								<id>generated-sources</id>
								<phase>${profile.content.phase}</phase>
								<goals>
									<goal>checkout</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<artifactId>maven-resources-plugin</artifactId>
						<version>${maven.resource.plugin.version}</version>
						<executions>
							<execution>
								<id>copy-content-resources</id>
								<phase>compile</phase>
								<goals>
									<goal>copy-resources</goal>
								</goals>
								<configuration>
									<outputDirectory>${content.output.directory}</outputDirectory>
									<resources>
										<resource>
											<directory>${content.source.directory}</directory>
										</resource>
									</resources>
								</configuration>
							</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>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/resources/goldenlayout/**</exclude>
								<exclude>**/src/main/resources/META-INF/dirigible/ide-ace/**</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-orion/**</exclude>
								<exclude>**/src/main/resources/META-INF/dirigible/ide-swagger/**</exclude>
								<exclude>**/src/main/resources/META-INF/dirigible/ide-database/sql/lib/ace/**</exclude>
								<exclude>**/src/main/resources/META-INF/dirigible/ide-discussions/ui/js/**</exclude>
								<exclude>**/src/main/resources/META-INF/dirigible/ide-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/v4/jsonpath.js</exclude>
							</excludes>
						</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.5.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.5.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.7</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.2.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.1.1</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>1.5</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>mvnrepository</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>api</module>
		<module>modules</module>
		<module>ide</module>
		<module>templates</module>
		<module>resources</module>
		<module>ext</module>
		<module>groups</module>
		<module>releng</module>
    </modules>
	<dependencies>
		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>javax.servlet-api</artifactId>
			<version>3.1.0</version>
			<scope>provided</scope>
		</dependency>

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

		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-frontend-jaxrs</artifactId>
			<version>${cxf.version}</version>
			<exclusions>
				<exclusion>
					<groupId>org.jboss.spec.javax.rmi</groupId>
					<artifactId>jboss-rmi-api_1.0_spec</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.apache.geronimo.specs</groupId>
					<artifactId>geronimo-javamail_1.4_spec</artifactId>
				</exclusion>
				<exclusion>
					<artifactId>wsdl4j</artifactId>
					<groupId>wsdl4j</groupId>
				</exclusion>
				<exclusion>
					<artifactId>jaxb-impl</artifactId>
					<groupId>com.sun.xml.bind</groupId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>com.google.code.gson</groupId>
			<artifactId>gson</artifactId>
			<version>${gson.version}</version>
		</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>
			<version>${commons.lang3}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-rs-service-description-swagger</artifactId>
			<version>${cxf.version}</version>
			<exclusions>
				<exclusion>
					<groupId>org.jboss.spec.javax.rmi</groupId>
					<artifactId>jboss-rmi-api_1.0_spec</artifactId>
				</exclusion>
				<exclusion>
					<artifactId>jackson-databind</artifactId>
					<groupId>com.fasterxml.jackson.core</groupId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>com.fasterxml.jackson.core</groupId>
			<artifactId>jackson-databind</artifactId>
			<version>2.10.5.1</version>
		</dependency>

		<!-- Java 11 Dependencies -->
		<dependency>
			<groupId>javax.xml.bind</groupId>
			<artifactId>jaxb-api</artifactId>
			<version>${jaxb.version}</version>
		</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>
			<version>${jaxws.version}</version>
		</dependency>

		<!-- Test Dependencies -->
		<dependency>
			<groupId>com.squareup.okhttp</groupId>
			<artifactId>okhttp</artifactId>
			<version>${okhttp.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>com.squareup.okhttp</groupId>
			<artifactId>okhttp-urlconnection</artifactId>
			<version>${okhttp.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>${junit.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-core</artifactId>
			<version>${mockito.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.powermock</groupId>
			<artifactId>powermock-module-junit4</artifactId>
			<version>${powermock-module-junit4.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.powermock</groupId>
			<artifactId>powermock-api-mockito2</artifactId>
			<version>${powermock-api-mockito2.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.hamcrest</groupId>
			<artifactId>hamcrest-all</artifactId>
			<version>${hamcrest.all.version}</version>
			<scope>test</scope>
		</dependency>
		<!-- End Test Dependencies -->
	</dependencies>

	<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>11</java.version>
		<maven.resource.plugin.version>3.2.0</maven.resource.plugin.version>
		<maven.clean.plugin.version>3.1.0</maven.clean.plugin.version>
		<maven.clean.plugin.directory>src/main/resources/META-INF/dirigible</maven.clean.plugin.directory>
		<maven.compiler.plugin.version>3.8.0</maven.compiler.plugin.version>
		<maven.compiler.source>11</maven.compiler.source>
		<maven.compiler.target>11</maven.compiler.target>
		<maven.scm.plugin.version>1.12.2</maven.scm.plugin.version>
		<scmVersionType>branch</scmVersionType>
		<commons.io>2.11.0</commons.io>
		<commons.codec>1.15</commons.codec>
		<commons.lang3>3.12.0</commons.lang3>
		<cxf.version>3.5.0</cxf.version>
		<gson.version>2.8.5</gson.version>
		<mockito.version>2.23.0</mockito.version>
		<powermock-api-mockito2.version>2.0.2</powermock-api-mockito2.version>
		<powermock-module-junit4.version>2.0.2</powermock-module-junit4.version>
		<junit.version>4.13.2</junit.version>
		<hamcrest.all.version>1.3</hamcrest.all.version>
		<retrofit.version>1.8.0</retrofit.version>
		<okhttp.version>2.7.5</okhttp.version>
		<slf4j.version>1.7.32</slf4j.version>
		<slf4j.simple.version>1.7.12</slf4j.simple.version>
		<logback.version>1.2.10</logback.version>
		<h2database.version>2.0.206</h2database.version>
		<derby.version>10.12.1.1</derby.version>
		<activemq.version>5.16.0</activemq.version>
		<jsr250-api.version>1.0</jsr250-api.version>
		<jetty.version>9.4.12.v20180830</jetty.version>
		<lucene.version>8.5.1</lucene.version>
		<chemistry.version>1.1.0</chemistry.version>
		<flowable.version>6.3.0</flowable.version>
		<jaxb.version>2.3.0</jaxb.version>
		<jaxws.version>2.3.3</jaxws.version>
		<license-maven-plugin.version>4.2.rc1</license-maven-plugin.version>
		<persistence.api.version>2.2.2</persistence.api.version>
		<jgit.version>6.0.0.202111291000-r</jgit.version>
		<javax.mail.api.version>1.6.4</javax.mail.api.version>
		<olingo.version>2.0.11</olingo.version>
		<kafka.version>2.6.0</kafka.version>
		<git-commit-id-plugin.version>4.0.2</git-commit-id-plugin.version>
		<mongodb.version>3.12.7</mongodb.version>
		<caffeine.version>3.0.3</caffeine.version>
		<liquibase-core.version>4.6.2</liquibase-core.version>
		<exec.maven.plugin>3.0.0</exec.maven.plugin>

		<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:git://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>
	</properties>

</project>