<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>imixs-office-workflow</artifactId>
		<groupId>org.imixs.workflow</groupId>
		<version>5.1.8</version>
	</parent>
	<artifactId>imixs-office-workflow-app</artifactId>
	<packaging>war</packaging>
	<name>Imixs Office Workflow App</name>

	<profiles>


		<profile>
			<id>docker-hub</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="push" />
											<arg value="imixs/${imixs-office.applicationname}:${project.version}" />
										</exec>
									</target>
								</configuration>
								<goals>
									<goal>run</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>


		<profile>
			<id>docker-hub-latest</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>
										<exec executable="docker">
											<arg value="push" />
											<arg value="imixs/${imixs-office.applicationname}" />
										</exec>
									</target>
								</configuration>
								<goals>
									<goal>run</goal>
								</goals>
							</execution>
						</executions>
					</plugin>

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

		<!-- Open ID Connect integration -->
		<profile>
			<id>auth-oidc</id>
			<dependencies>
				<dependency>
					<groupId>org.imixs.workflow</groupId>
					<artifactId>imixs-office-workflow-oidc</artifactId>
					<scope>compile</scope>
					<version>${project.parent.version}</version>
				</dependency>
			</dependencies>
		</profile>

		<!-- Wildfly Open ID Connect integration -->
		<profile>
			<id>auth-oidc-wildfly</id>
			<dependencies>
				<dependency>
					<groupId>org.imixs.workflow</groupId>
					<artifactId>imixs-office-workflow-oidc-wildfly</artifactId>
					<scope>compile</scope>
					<version>${project.parent.version}</version>
				</dependency>
			</dependencies>
		</profile>
	</profiles>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-war-plugin</artifactId>
				<version>3.2.0</version>
				<configuration>
					<webResources>
						<resource>
							<filtering>true</filtering>
							<!-- this is relative to the pom.xml directory -->
							<directory>${custom.webResources}</directory>
							<includes>
								<include>**/WEB-INF/*</include>
								<include>/src/main/resources/*</include>
								<!-- include any other file types you want to filter -->
							</includes>
						</resource>
					</webResources>
				</configuration>
			</plugin>

			<!-- Manik Hot Deployment -->
			<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/imixs-office-workflow.war</target>
						</deployment>
					</hotdeployments>

				</configuration>
			</plugin>

		</plugins>
		<finalName>imixs-office-workflow</finalName>
	</build>

	<dependencies>

		<dependency>
			<groupId>org.imixs.workflow</groupId>
			<artifactId>imixs-office-workflow-util</artifactId>
			<scope>compile</scope>
			<version>${project.parent.version}</version>
		</dependency>

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


		<!-- Apache Solr 
		<dependency>
			<groupId>org.imixs.workflow</groupId>
			<artifactId>imixs-workflow-index-solr</artifactId>
			<scope>compile</scope>
		</dependency>
		-->

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

		<!-- Marty -->
		<dependency>
			<groupId>org.imixs.workflow</groupId>
			<artifactId>imixs-marty</artifactId>
		</dependency>

		<!-- Imixs Data -->
		<dependency>
			<groupId>org.imixs.workflow</groupId>
			<artifactId>imixs-data-groups</artifactId>
			<version>${org.imixs.data.version}</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>org.imixs.workflow</groupId>
			<artifactId>imixs-data-views</artifactId>
			<version>${org.imixs.data.version}</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>org.imixs.workflow</groupId>
			<artifactId>imixs-data-documents</artifactId>
			<version>${org.imixs.data.version}</version>
		</dependency>
		<dependency>
			<groupId>org.imixs.workflow</groupId>
			<artifactId>imixs-data-importer</artifactId>
			<version>${org.imixs.data.version}</version>
		</dependency>

		<!-- Imixs-AI -->
		<dependency>
			<groupId>org.imixs.workflow</groupId>
			<artifactId>imixs-ai-workflow</artifactId>
		</dependency>
		<dependency>
			<groupId>org.imixs.workflow</groupId>
			<artifactId>imixs-ai-agent</artifactId>
		</dependency>

		<!-- xsl 2.0 support -->
		<dependency>
			<groupId>net.sf.saxon</groupId>
			<artifactId>Saxon-HE</artifactId>
			<version>${net.sf.saxon.version}</version>
		</dependency>

	</dependencies>
</project>