<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>

	<artifactId>dsf-bpe-server</artifactId>

	<parent>
		<groupId>dev.dsf</groupId>
		<artifactId>dsf-bpe-pom</artifactId>
		<version>1.3.2</version>
	</parent>

	<dependencies>
		<dependency>
			<groupId>dev.dsf</groupId>
			<artifactId>dsf-bpe-process-api-v1</artifactId>
		</dependency>
		<dependency>
			<groupId>dev.dsf</groupId>
			<artifactId>dsf-fhir-websocket-client</artifactId>
		</dependency>
		<dependency>
			<groupId>dev.dsf</groupId>
			<artifactId>dsf-fhir-webservice-client</artifactId>
		</dependency>
		<dependency>
			<groupId>dev.dsf</groupId>
			<artifactId>dsf-tools-build-info-reader</artifactId>
		</dependency>
		<dependency>
			<groupId>dev.dsf</groupId>
			<artifactId>dsf-tools-docker-secrets-reader</artifactId>
		</dependency>
		<dependency>
			<groupId>dev.dsf</groupId>
			<artifactId>dsf-common-auth</artifactId>
		</dependency>
		<dependency>
			<groupId>dev.dsf</groupId>
			<artifactId>dsf-common-config</artifactId>
		</dependency>
		<dependency>
			<groupId>dev.dsf</groupId>
			<artifactId>dsf-common-documentation</artifactId>
		</dependency>
		<dependency>
			<groupId>dev.dsf</groupId>
			<artifactId>dsf-common-status</artifactId>
		</dependency>
		<dependency>
			<groupId>de.hs-heilbronn.mi</groupId>
			<artifactId>crypto-utils</artifactId>
		</dependency>

		<!-- dependencies for process plugins -->
		<dependency>
			<groupId>dev.dsf</groupId>
			<artifactId>dsf-fhir-validation</artifactId>
		</dependency>

		<dependency>
			<groupId>jakarta.servlet</groupId>
			<artifactId>jakarta.servlet-api</artifactId>
		</dependency>
		<dependency>
			<groupId>jakarta.ws.rs</groupId>
			<artifactId>jakarta.ws.rs-api</artifactId>
		</dependency>
		<dependency>
			<groupId>org.glassfish.jaxb</groupId>
			<artifactId>jaxb-runtime</artifactId>
		</dependency>

		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-context</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-tx</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-jdbc</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-web</artifactId>
		</dependency>

		<dependency>
			<groupId>org.glassfish.jersey.core</groupId>
			<artifactId>jersey-server</artifactId>
		</dependency>
		<dependency>
			<groupId>org.glassfish.jersey.inject</groupId>
			<artifactId>jersey-hk2</artifactId>
		</dependency>
		<dependency>
			<groupId>org.glassfish.jersey.media</groupId>
			<artifactId>jersey-media-json-jackson</artifactId>
		</dependency>
		<dependency>
			<groupId>org.glassfish.jersey.containers</groupId>
			<artifactId>jersey-container-servlet</artifactId>
		</dependency>

		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-dbcp2</artifactId>
			<exclusions>
				<exclusion>
					<artifactId>commons-logging</artifactId>
					<groupId>commons-logging</groupId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>jcl-over-slf4j</artifactId>
		</dependency>
		<dependency>
			<groupId>org.postgresql</groupId>
			<artifactId>postgresql</artifactId>
		</dependency>

		<dependency>
			<groupId>org.camunda.bpm</groupId>
			<artifactId>camunda-engine</artifactId>
		</dependency>
		<dependency>
			<groupId>org.camunda.bpm</groupId>
			<artifactId>camunda-engine-spring</artifactId>
		</dependency>

		<dependency>
			<groupId>com.fasterxml.uuid</groupId>
			<artifactId>java-uuid-generator</artifactId>
		</dependency>

		<dependency>
			<groupId>com.sun.mail</groupId>
			<artifactId>jakarta.mail</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.logging.log4j</groupId>
			<artifactId>log4j-core</artifactId>
		</dependency>
		<dependency>
			<groupId>org.bouncycastle</groupId>
			<artifactId>bcmail-jdk18on</artifactId>
		</dependency>

		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-core</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>de.hs-heilbronn.mi</groupId>
			<artifactId>db-test-utils</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.logging.log4j</groupId>
			<artifactId>log4j-slf4j2-impl</artifactId>
			<scope>test</scope>
		</dependency>
		<!-- For async logging with log4j2 -->
		<dependency>
			<groupId>com.lmax</groupId>
			<artifactId>disruptor</artifactId>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<testResources>
			<testResource>
				<directory>src/test/resources</directory>
				<filtering>false</filtering>
				<excludes>
					<exclude>**/version.properties</exclude>
				</excludes>
			</testResource>
			<testResource>
				<directory>src/test/resources</directory>
				<filtering>true</filtering>
				<includes>
					<include>**/version.properties</include>
				</includes>
			</testResource>
		</testResources>

		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<configuration>
					<systemPropertyVariables>
						<log4j.configurationFile>log4j2-maven-surefire-config.xml</log4j.configurationFile>
					</systemPropertyVariables>
					<excludes>
						<exclude>**/*DaoTest</exclude>
						<exclude>**/*IntegrationTest</exclude>
					</excludes>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-failsafe-plugin</artifactId>
				<configuration>
					<systemPropertyVariables>
						<log4j.configurationFile>log4j2-maven-surefire-config.xml</log4j.configurationFile>
					</systemPropertyVariables>
					<includes>
						<include>**/*DaoTest</include>
						<include>**/*IntegrationTest</include>
					</includes>
				</configuration>
				<executions>
					<execution>
						<goals>
							<goal>integration-test</goal>
							<goal>verify</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>io.fabric8</groupId>
				<artifactId>docker-maven-plugin</artifactId>
				<extensions>true</extensions>
				<executions>
					<execution>
						<id>start-postgres</id>
						<phase>pre-integration-test</phase>
						<goals>
							<goal>start</goal>
						</goals>
						<configuration>
							<images>
								<image>
									<name>postgres:15</name>
									<run>
										<ports>
											<port>127.0.0.1:54321:5432</port>
										</ports>
										<env>
											<TZ>Europe/Berlin</TZ>
											<POSTGRES_USER>postgres</POSTGRES_USER>
											<POSTGRES_PASSWORD>password</POSTGRES_PASSWORD>
											<POSTGRES_DB>db</POSTGRES_DB>
										</env>
										<wait>
											<!-- <log>(?s)database system is ready to accept connections.*database system is ready to accept connections</log> -->
											<time>2500</time>
										</wait>
									</run>
								</image>
							</images>
						</configuration>
					</execution>
					<execution>
						<id>stop-postgres</id>
						<phase>post-integration-test</phase>
						<goals>
							<goal>stop</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
</project>