<?xml version="1.0"?>
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>

	<parent>
		<groupId>com.top-logic</groupId>
		<artifactId>tl-parent-app</artifactId>
		<version>0.0.1-REACT</version>
	</parent>

	<artifactId>tl-parent-app-internal</artifactId>

	<name>${project.artifactId}</name>
	<description>Parent module for TopLogic applications provided by BOS.</description>

	<organization>
		<name>Business Operation Systems GmbH</name>
		<url>https://www.top-logic.com</url>
	</organization>
	<url>https://github.com/top-logic/tl-engine/</url>

	<packaging>pom</packaging>
	
	<dependencies>
		<!-- Alternative databases for test. -->

		<!-- 
			Note: Must only be configured by default in internal modules. Otherwise a customer would be required 
			to install all drivers of all supported DBs to start development. 
		-->
		<dependency>
		    <groupId>com.mysql</groupId>
		    <artifactId>mysql-connector-j</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
		    <groupId>com.microsoft.sqlserver</groupId>
		    <artifactId>mssql-jdbc</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
		    <groupId>com.oracle.database.jdbc</groupId>
		    <artifactId>ojdbc11</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>com.top-logic</groupId>
			<artifactId>ext-com-ibm-db2</artifactId>
			<type>pom</type>
			<scope>test</scope>
		</dependency>
		<dependency>
		    <groupId>org.postgresql</groupId>
		    <artifactId>postgresql</artifactId>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<profiles>
		<!-- Profiles for including a database driver to the final application WAR. -->
		
		<!-- 
			Note: This section must be repeated from the public app parent to be able to override the test 
			dependencies above.
		-->
		<profile>
			<id>with-h2</id>
			
			<properties>
				<tl.app.metaConfAddons>db-h2.xml</tl.app.metaConfAddons>
			</properties>

			<dependencies>
				<dependency>
				    <groupId>com.h2database</groupId>
				    <artifactId>h2</artifactId>
			  	</dependency>
			  	<dependency>
				    <groupId>com.manticore-projects.tools</groupId>
				    <artifactId>h2migrationtool</artifactId>
				</dependency>
			</dependencies>
		</profile>
		<profile>
			<id>with-mysql</id>

			<properties>
				<tl.app.metaConfAddons>db-mysql.xml</tl.app.metaConfAddons>
			</properties>

			<dependencies>
				<dependency>
					<groupId>com.mysql</groupId>
					<artifactId>mysql-connector-j</artifactId>
				</dependency>
			</dependencies>
		</profile>
		<profile>
			<id>with-oracle</id>

			<properties>
				<tl.app.metaConfAddons>db-oracle.xml</tl.app.metaConfAddons>
			</properties>

			<dependencies>
				<dependency>
				    <groupId>com.oracle.database.jdbc</groupId>
				    <artifactId>ojdbc11</artifactId>
				</dependency>
			</dependencies>
		</profile>
		<profile>
			<id>with-postgresql</id>

			<properties>
				<tl.app.metaConfAddons>db-postgresql.xml</tl.app.metaConfAddons>
			</properties>

			<dependencies>
				<dependency>
				    <groupId>org.postgresql</groupId>
				    <artifactId>postgresql</artifactId>
				</dependency>
			</dependencies>
		</profile>
		<profile>
			<id>with-db2</id>

			<properties>
				<tl.app.metaConfAddons>db-db2.xml</tl.app.metaConfAddons>
			</properties>

			<dependencies>
				<dependency>
					<groupId>com.top-logic</groupId>
					<artifactId>ext-com-ibm-db2</artifactId>
					<type>pom</type>
				</dependency>
			</dependencies>
		</profile>
		<profile>
			<id>with-mssql</id>

			<properties>
				<tl.app.metaConfAddons>db-mssql.xml</tl.app.metaConfAddons>
			</properties>

			<dependencies>
				<dependency>
					<groupId>com.top-logic</groupId>
					<artifactId>ext-com.microsoft-sqlserver-jdbc</artifactId>
					<type>pom</type>
				</dependency>
			</dependencies>
		</profile>
		
	  	<profile>
	  		<id>bos</id>
	  		
	  		<activation>
	  			<activeByDefault>false</activeByDefault>
	  		</activation>
	  		
	  		<dependencies>
			    <dependency>
					<groupId>com.top-logic</groupId>
					<artifactId>bos-deepl</artifactId>
					<version>7.8.1</version>
			    </dependency>

			    <dependency>
			      <groupId>com.top-logic</groupId>
			      <artifactId>bos-ldap</artifactId>
			      <version>7.8.1</version>
			    </dependency>
	  		</dependencies>
	  	</profile>
	</profiles>

</project>
