<?xml version="1.0" encoding="UTF-8"?>
<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>
		<artifactId>office-alexander-logistics</artifactId>
		<groupId>com.alexander-logistics</groupId>
		<version>1.3.0</version>
	</parent>
	<artifactId>office-alexander-logistics-app</artifactId>
	<packaging>war</packaging>
	<name>Imixs Office Workflow App</name>

	<profiles>
		<profile>
			<id>docker</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-antrun-plugin</artifactId>
						<version>1.8</version>
						<executions>
							<execution>
								<phase>install</phase>
								<configuration>
									<target>
										<exec executable="docker">
											<arg value="build" />
											<arg value="-t" />
											<arg value="imixs/${imixs-office.applicationname}" />
											<arg value="../." />
										</exec>
									</target>
								</configuration>
								<goals>
									<goal>run</goal>
								</goals>
							</execution>
						</executions>
					</plugin>

				</plugins>
			</build>
		</profile>

		<profile>
			<id>debug</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-antrun-plugin</artifactId>
						<version>1.8</version>
						<executions>
							<execution>
								<phase>install</phase>
								<configuration>
									<target>
										<exec executable="docker">
											<arg value="build" />
											<arg value="-f" />
											<arg value="../Dockerfile-wildfly-debug" />
											<arg value="-t" />
											<arg value="imixs/${imixs-office.applicationname}" />
											<arg value="../." />
										</exec>
									</target>
								</configuration>
								<goals>
									<goal>run</goal>
								</goals>
							</execution>
						</executions>
					</plugin>

				</plugins>
			</build>
		</profile>

		<profile>
			<id>kubernetes</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-antrun-plugin</artifactId>
						<version>1.8</version>
						<executions>
							<execution>
								<phase>install</phase>
								<configuration>
									<target>
										<exec executable="docker">
											<arg value="build" />
											<arg value="-t" />
											<arg
												value="imixs/${imixs-office.applicationname}:${project.version}" />
											<arg value="../." />
										</exec>
										<exec executable="docker">
											<arg value="tag" />
											<arg
												value="imixs/${imixs-office.applicationname}:${project.version}" />
											<arg
												value="${org.imixs.kubernetes.registry}/imixs/${imixs-office.applicationname}:${project.version}" />
										</exec>
										<exec executable="docker">
											<arg value="push" />
											<arg
												value="${org.imixs.kubernetes.registry}/imixs/${imixs-office.applicationname}:${project.version}" />
										</exec>
									</target>
								</configuration>
								<goals>
									<goal>run</goal>
								</goals>
							</execution>
						</executions>
					</plugin>

				</plugins>
			</build>
		</profile>

	</profiles>
	<build>
		<testResources>
			<testResource>
				<directory>${basedir}/../reports</directory>
			</testResource>
			<testResource>
				<directory>${basedir}/src/test/resources</directory>
			</testResource>
		</testResources>

		<plugins>
			<plugin>
				<artifactId>maven-war-plugin</artifactId>
				<version>3.3.2</version>
				<configuration>
					<failOnMissingWebXml>false</failOnMissingWebXml>
					<webResources>
						<resource>
							<filtering>true</filtering>
							<!-- this is relative to the pom.xml directory -->
							<directory>${custom.webResources}</directory>
							<includes>
								<include>**/WEB-INF/*</include>
								<!-- include any other file types you want to filter -->
							</includes>
						</resource>
					</webResources>
					<workDirectory>target/overlay-war-folder</workDirectory>
					<!-- We exclude libs form the parent WAR artifact -->
					<overlays>
						<overlay>
							<groupId>org.imixs.workflow</groupId>
							<artifactId>imixs-office-workflow-app</artifactId>
							<excludes>
								<exclude>WEB-INF/lib/*.jar</exclude>
							</excludes>
						</overlay>
					</overlays>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.imixs.maven</groupId>
				<artifactId>manik-hotdeploy-maven-plugin</artifactId>
				<version>2.0.0</version>
				<executions>
					<execution>
						<phase>install</phase>
						<goals>
							<goal>deploy</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<!-- List Source and Target folders for Autodeploy and Hotdeploy -->
					<autodeployments>
						<deployment>
							<!-- wildcard deployment -->
							<source>target/*.{war,ear,jar}</source>
							<target>../docker/deployments/</target>
							<unpack>true</unpack>
						</deployment>
					</autodeployments>
					<hotdeployments>
						<deployment>
							<source>src/main/webapp</source>
							<target>../docker/deployments/office-alexander-logistics.war</target>
						</deployment>
					</hotdeployments>

				</configuration>

			</plugin>


		</plugins>
	</build>


	<dependencies>
		<!-- Imixs Workflow -->
		<dependency>
			<groupId>org.imixs.workflow</groupId>
			<artifactId>imixs-workflow-core</artifactId>
			<type>jar</type>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>org.imixs.workflow</groupId>
			<artifactId>imixs-workflow-engine</artifactId>
			<type>jar</type>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>org.imixs.workflow</groupId>
			<artifactId>imixs-workflow-jax-rs</artifactId>
			<type>jar</type>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>org.imixs.workflow</groupId>
			<artifactId>imixs-workflow-faces</artifactId>
			<type>jar</type>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>org.imixs.workflow</groupId>
			<artifactId>imixs-workflow-index-lucene</artifactId>
			<scope>compile</scope>
		</dependency>

		<!-- Marty -->
		<dependency>
			<groupId>org.imixs.workflow</groupId>
			<artifactId>imixs-marty</artifactId>
			<type>jar</type>
			<scope>compile</scope>
		</dependency>

		<!-- Imixs-Office-Workflow -->
		<dependency>
			<groupId>org.imixs.workflow</groupId>
			<artifactId>imixs-office-workflow-app</artifactId>
			<type>war</type>
		</dependency>

		<dependency>
			<groupId>org.imixs.workflow</groupId>
			<artifactId>imixs-office-workflow-util</artifactId>
			<scope>compile</scope>
		</dependency>

		<!-- Imixs-Archive -->
		<dependency>
			<groupId>org.imixs.workflow</groupId>
			<artifactId>imixs-archive-api</artifactId>
			<scope>compile</scope>
		</dependency>

		<!-- Imixs-Archive Documents -->
		<dependency>
			<groupId>org.imixs.workflow</groupId>
			<artifactId>imixs-archive-documents</artifactId>
			<scope>compile</scope>
		</dependency>

		<!-- Imixs-Archive Importer -->
		<dependency>
			<groupId>org.imixs.workflow</groupId>
			<artifactId>imixs-archive-importer</artifactId>
			<scope>compile</scope>
		</dependency>

		<!-- SEPA Adapter -->
		<dependency>
			<groupId>org.imixs.workflow</groupId>
			<artifactId>imixs-adapters-sepa</artifactId>
			<scope>compile</scope>
		</dependency>
		<!-- DATEV Adapter -->
		<dependency>
			<groupId>org.imixs.workflow</groupId>
			<artifactId>imixs-adapters-datev</artifactId>
			<scope>compile</scope>
		</dependency>
		<!-- QR Code -->
		<dependency>
			<groupId>org.imixs.workflow</groupId>
			<artifactId>imixs-adapters-qrcode</artifactId>
			<scope>compile</scope>
		</dependency>
		<!-- POI Adapter -->
		<dependency>
			<groupId>org.imixs.workflow</groupId>
			<artifactId>imixs-adapters-poi</artifactId>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>org.imixs.workflow</groupId>
			<artifactId>imixs-ai-workflow</artifactId>
			<version>${org.imixs.ai.version}</version>
			<scope>compile</scope>
		</dependency>

		<!-- xsl 2.0 support for Reporting / Chart Diagrams -->
		<dependency>
			<groupId>net.sf.saxon</groupId>
			<artifactId>Saxon-HE</artifactId>
		</dependency>
		<!-- Apache PDFBox -->
		<dependency>
			<groupId>org.apache.pdfbox</groupId>
			<artifactId>pdfbox</artifactId>
			<version>${apache.pdfbox.version}</version>
			<scope>compile</scope>
		</dependency>

		<!-- Apache Commons FTP Client -->
		<dependency>
			<groupId>commons-net</groupId>
			<artifactId>commons-net</artifactId>
			<version>3.6</version>
		</dependency>

		<!-- Microsoft oauth token -->
		<dependency>
			<groupId>com.sun.mail</groupId>
			<artifactId>javax.mail</artifactId>
			<version>1.6.2</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.httpcomponents</groupId>
			<artifactId>httpclient</artifactId>
			<version>4.5.10</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>com.fasterxml.jackson.core</groupId>
			<artifactId>jackson-databind</artifactId>
			<version>2.13.3</version>
			<scope>test</scope>
		</dependency>


		<!-- JUnit Tests
		<dependency>
			<groupId>javax.json</groupId>
			<artifactId>javax.json-api</artifactId>
			<version>1.1</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.glassfish</groupId>
			<artifactId>javax.json</artifactId>
			<version>1.1</version>
			<scope>test</scope>
		</dependency>
		 -->
		<!-- JAX-RS 2.0 Test dependencies -->
		<dependency>
			<groupId>org.glassfish.jersey.core</groupId>
			<artifactId>jersey-client</artifactId>
			<version>3.1.2</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-rs-client</artifactId>
			<version>3.3.6</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.glassfish.jersey.inject</groupId>
			<artifactId>jersey-hk2</artifactId>
			<version>3.1.2</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>jakarta.ws.rs</groupId>
			<artifactId>jakarta.ws.rs-api</artifactId>
			<version>3.1.0</version>
			<scope>test</scope>
		</dependency>

	</dependencies>
</project>