<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.github.jonasrutishauser</groupId>
		<artifactId>transactional-event</artifactId>
		<version>2.0.0</version>
	</parent>

	<artifactId>transactional-event-liberty-it</artifactId>
	<packaging>war</packaging>

	<name>Transactional Event Library Openliberty Tests</name>

	<properties>
		<maven.javadoc.skip>true</maven.javadoc.skip>
	</properties>

	<dependencies>
		<dependency>
			<groupId>${project.groupId}</groupId>
			<artifactId>transactional-event-api</artifactId>
			<version>${project.version}</version>
		</dependency>

		<dependency>
			<groupId>${project.groupId}</groupId>
			<artifactId>transactional-event-core</artifactId>
			<version>${project.version}</version>
			<scope>runtime</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.logging.log4j</groupId>
			<artifactId>log4j-core</artifactId>
			<version>${log4j.version}</version>
			<scope>runtime</scope>
		</dependency>

		<dependency>
			<groupId>jakarta.servlet</groupId>
			<artifactId>jakarta.servlet-api</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>jakarta.ws.rs</groupId>
			<artifactId>jakarta.ws.rs-api</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>jakarta.enterprise</groupId>
			<artifactId>jakarta.enterprise.cdi-api</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>jakarta.transaction</groupId>
			<artifactId>jakarta.transaction-api</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>jakarta.json.bind</groupId>
			<artifactId>jakarta.json.bind-api</artifactId>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter-api</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter-engine</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.awaitility</groupId>
			<artifactId>awaitility</artifactId>
			<version>4.2.0</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.jboss.resteasy</groupId>
			<artifactId>resteasy-client</artifactId>
			<version>6.0.1.Final</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>javax.activation</groupId>
			<artifactId>activation</artifactId>
			<version>1.1.1</version>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<artifactId>maven-war-plugin</artifactId>
				<version>3.3.1</version>
			</plugin>
			<plugin>
				<artifactId>maven-failsafe-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>io.openliberty.tools</groupId>
				<artifactId>liberty-maven-plugin</artifactId>
				<version>3.7.1</version>
				<configuration>
					<applications>${project.artifactId}</applications>
					<stripVersion>true</stripVersion>
					<copyDependencies>
						<dependency>
							<groupId>com.h2database</groupId>
							<artifactId>h2</artifactId>
							<version>2.1.214</version>
						</dependency>
					</copyDependencies>
				</configuration>
				<executions>
					<execution>
						<id>stop-before-clean</id>
						<phase>pre-clean</phase>
						<goals>
							<goal>stop</goal>
						</goals>
					</execution>
					<execution>
						<id>create-server</id>
						<phase>prepare-package</phase>
						<goals>
							<goal>install-server</goal>
							<goal>create</goal>
						</goals>
					</execution>
					<execution>
						<id>install-feature</id>
						<phase>prepare-package</phase>
						<goals>
							<goal>install-feature</goal>
						</goals>
					</execution>
					<execution>
						<id>install-apps</id>
						<phase>package</phase>
						<goals>
							<goal>deploy</goal>
						</goals>
					</execution>
					<execution>
						<id>test-start</id>
						<phase>pre-integration-test</phase>
						<goals>
							<goal>test-start</goal>
						</goals>
					</execution>
					<execution>
						<id>test-stop</id>
						<phase>post-integration-test</phase>
						<goals>
							<goal>test-stop</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
				<executions>
					<execution>
						<id>prepare-agent-openliberty</id>
						<goals>
							<goal>prepare-agent-integration</goal>
						</goals>
						<phase>package</phase>
						<configuration>
							<propertyName>liberty.jvm.jacoco</propertyName>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
</project>
