<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<parent>
		<groupId>com.suncode</groupId>
		<artifactId>plusworkflow</artifactId>
		<version>4.1.108</version>
	</parent>

	<artifactId>plusworkflow-web</artifactId>
	<packaging>war</packaging>

	<dependencies>
		<dependency>
			<groupId>com.suncode</groupId>
			<artifactId>plusworkflow-core</artifactId>
		</dependency>
		<dependency>
			<groupId>com.suncode</groupId>
			<artifactId>plusworkflow-old-core</artifactId>
		</dependency>
		<dependency>
			<groupId>com.suncode</groupId>
			<artifactId>plusworkflow-i18n</artifactId>
		</dependency>
		<dependency>
			<groupId>com.suncode</groupId>
			<artifactId>plusworkflow-audit</artifactId>
			<type>war</type>
		</dependency>
		<dependency>
			<groupId>com.suncode</groupId>
			<artifactId>plusworkflow-form-core</artifactId>
		</dependency>
		<dependency>
			<groupId>com.suncode</groupId>
			<artifactId>plusworkflow-form-web</artifactId>
			<type>war</type>
		</dependency>
		<dependency>
			<groupId>com.suncode</groupId>
			<artifactId>cuf-core</artifactId>
		</dependency>
		<dependency>
			<groupId>com.suncode</groupId>
			<artifactId>cuf-web</artifactId>
			<type>war</type>
		</dependency>
		<dependency>
			<groupId>com.suncode</groupId>
			<artifactId>plusworkflow-upgrader</artifactId>
		</dependency>

		<dependency>
			<groupId>com.suncode.plugin</groupId>
			<artifactId>plugin-framework-api</artifactId>
		</dependency>
		<dependency>
			<groupId>com.suncode.plugin</groupId>
			<artifactId>plugin-framework-core</artifactId>
		</dependency>
		<dependency>
			<groupId>com.suncode.plugin</groupId>
			<artifactId>plugin-framework-web</artifactId>
		</dependency>

		<dependency>
			<groupId>com.suncode</groupId>
			<artifactId>xpdl-parser</artifactId>
			<exclusions>
				<exclusion>
					<groupId>log4j</groupId>
					<artifactId>log4j</artifactId>
				</exclusion>
			</exclusions>
		</dependency>

		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>javax.servlet-api</artifactId>
		</dependency>
		<dependency>
			<groupId>javax.servlet.jsp</groupId>
			<artifactId>javax.servlet.jsp-api</artifactId>
		</dependency>
		<dependency>
			<groupId>jstl</groupId>
			<artifactId>jstl</artifactId>
		</dependency>

		<dependency>
			<groupId>org.json</groupId>
			<artifactId>json</artifactId>
		</dependency>
		<dependency>
			<groupId>com.google.code.gson</groupId>
			<artifactId>gson</artifactId>
		</dependency>
		<dependency>
			<groupId>com.fasterxml.jackson.core</groupId>
			<artifactId>jackson-databind</artifactId>
		</dependency>

		<dependency>
			<groupId>com.fasterxml.jackson.datatype</groupId>
			<artifactId>jackson-datatype-hibernate4</artifactId>
		</dependency>

		<dependency>
			<groupId>org.hibernate</groupId>
			<artifactId>hibernate-core</artifactId>
		</dependency>
		<dependency>
			<groupId>org.hibernate</groupId>
			<artifactId>hibernate-validator</artifactId>
		</dependency>

		<dependency>
			<groupId>com.plusmpm</groupId>
			<artifactId>displaytag</artifactId>
		</dependency>
		<dependency>
			<groupId>com.plusmpm</groupId>
			<artifactId>displaytag-export-poi</artifactId>
		</dependency>
		<dependency>
			<groupId>com.plusmpm</groupId>
			<artifactId>displaytag-portlet</artifactId>
		</dependency>

		<dependency>
			<groupId>com.github.librepdf</groupId>
			<artifactId>openpdf</artifactId>
		</dependency>


		<dependency>
			<groupId>xml-apis</groupId>
			<artifactId>xml-apis</artifactId>
		</dependency>

		<dependency>
			<groupId>com.sun.mail</groupId>
			<artifactId>javax.mail</artifactId>
		</dependency>
		<dependency>
			<groupId>javax.activation</groupId>
			<artifactId>activation</artifactId>
		</dependency>
		<dependency>
			<groupId>com.suncode</groupId>
			<artifactId>ajaxtags</artifactId>
		</dependency>

		<dependency>
			<groupId>org.apache.tomcat</groupId>
			<artifactId>tomcat-catalina</artifactId>
			<version>8.5.70</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>struts</groupId>
			<artifactId>struts</artifactId>
		</dependency>
		<dependency>
			<groupId>ro.isdc.wro4j</groupId>
			<artifactId>wro4j-core</artifactId>
		</dependency>

		<dependency>
			<groupId>javax.sql</groupId>
			<artifactId>jdbc-stdext</artifactId>
		</dependency>

		<!-- JXL -->
		<dependency>
			<groupId>net.sourceforge.jexcelapi</groupId>
			<artifactId>jxl</artifactId>
			<exclusions>
				<exclusion>
					<groupId>log4j</groupId>
					<artifactId>log4j</artifactId>
				</exclusion>
			</exclusions>
		</dependency>

		<!-- Apache Lucene -->
		<dependency>
			<groupId>org.apache.lucene</groupId>
			<artifactId>lucene-core</artifactId>
		</dependency>

		<!-- JFreeChart -->
		<dependency>
			<groupId>org.jfree</groupId>
			<artifactId>jfreechart</artifactId>
		</dependency>
		<dependency>
			<groupId>org.jfree</groupId>
			<artifactId>jcommon</artifactId>
		</dependency>

		<!-- xFire -->
		<dependency>
			<groupId>org.codehaus.xfire</groupId>
			<artifactId>xfire-core</artifactId>
		</dependency>
		<dependency>
			<groupId>org.codehaus.xfire</groupId>
			<artifactId>xfire-java5</artifactId>
		</dependency>
		<dependency>
			<groupId>org.codehaus.xfire</groupId>
			<artifactId>xfire-spring</artifactId>
		</dependency>

		<!-- Java Advanced Imaging -->
		<dependency>
			<groupId>javax.media</groupId>
			<artifactId>jai-core</artifactId>
		</dependency>
		<dependency>
			<groupId>com.sun.media</groupId>
			<artifactId>jai-codec</artifactId>
		</dependency>

		<!-- Spring framework -->
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-core</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-context</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-beans</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-orm</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-web</artifactId>
		</dependency>

		<!-- Apache commons -->
		<dependency>
			<groupId>commons-io</groupId>
			<artifactId>commons-io</artifactId>
		</dependency>
		<dependency>
			<groupId>commons-fileupload</groupId>
			<artifactId>commons-fileupload</artifactId>
		</dependency>
		<dependency>
			<groupId>commons-codec</groupId>
			<artifactId>commons-codec</artifactId>
		</dependency>
		<dependency>
			<groupId>commons-lang</groupId>
			<artifactId>commons-lang</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-lang3</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-text</artifactId>
		</dependency>
		<dependency>
			<groupId>commons-digester</groupId>
			<artifactId>commons-digester</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.httpcomponents.client5</groupId>
			<artifactId>httpclient5</artifactId>
		</dependency>

		<!-- JAX RPC -->
		<dependency>
			<groupId>javax.xml</groupId>
			<artifactId>jaxrpc-api</artifactId>
		</dependency>

		<dependency>
			<groupId>com.sun</groupId>
			<artifactId>pdf-view</artifactId>
		</dependency>
		<dependency>
		    <groupId>org.apache.pdfbox</groupId>
		    <artifactId>jbig2-imageio</artifactId>
		</dependency>
		<dependency>
			<groupId>org.fontbox</groupId>
			<artifactId>fontbox</artifactId>
		</dependency>
		<dependency>
			<groupId>org.jempbox</groupId>
			<artifactId>jempbox</artifactId>
		</dependency>

		<dependency>
			<groupId>org.apache.poi</groupId>
			<artifactId>poi</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.poi</groupId>
			<artifactId>poi-scratchpad</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.poi</groupId>
			<artifactId>poi-ooxml</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.poi</groupId>
			<artifactId>poi-ooxml-full</artifactId>
		</dependency>
		<dependency>
			<groupId>org.docx4j</groupId>
			<artifactId>docx4j</artifactId>
		</dependency>

		<!-- Apache PDFBox -->
		<dependency>
			<groupId>org.apache.pdfbox</groupId>
			<artifactId>pdfbox</artifactId>
		</dependency>

		<dependency>
			<groupId>net.htmlparser.jericho</groupId>
			<artifactId>jericho-html</artifactId>
		</dependency>

		<!-- SHARK -->
		<dependency>
			<groupId>org.enhydra</groupId>
			<artifactId>shark</artifactId>
			<type>pom</type>
		</dependency>

		<dependency>
			<groupId>eu.bitwalker</groupId>
			<artifactId>UserAgentUtils</artifactId>
		</dependency>

		<!-- TEST -->
		<dependency>
			<groupId>postgresql</groupId>
			<artifactId>postgresql</artifactId>
			<version>9.1-901-1.jdbc4</version>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<resources>
			<resource>
				<directory>src/main/java</directory>
				<excludes>
					<exclude>**/*.java</exclude>
				</excludes>
			</resource>
			<resource>
				<directory>src/main/resources</directory>
				<filtering>true</filtering>
			</resource>
		</resources>
		<finalName>PlusWorkflow</finalName>
		<plugins>
			<plugin>
				<artifactId>maven-clean-plugin</artifactId>
				<version>3.1.0</version>
				<configuration>
					<filesets>
						<fileset>
							<directory>node</directory>
						</fileset>
						<fileset>
							<directory>node_modules</directory>
						</fileset>
					</filesets>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.tomcat.maven</groupId>
				<artifactId>tomcat7-maven-plugin</artifactId>
				<version>2.2</version>
				<configuration>
					<path>/</path>
					<contextFile>src/main/webapp/META-INF/context-embedded.xml</contextFile>
					<mode>context</mode>
					<charset>UTF-8</charset>
					<warDirectory>target/PlusWorkflow</warDirectory>
				</configuration>
			</plugin>
			<plugin>
				<groupId>com.github.eirslett</groupId>
				<artifactId>frontend-maven-plugin</artifactId>
				<version>1.7.6</version>
				<configuration>
					<environmentVariables>
						<NODE_OPTIONS>--max_old_space_size=4098</NODE_OPTIONS>
					</environmentVariables>
				</configuration>
				<executions>
					<execution>
						<id>install node and npm</id>
						<phase>prepare-package</phase>
						<goals>
							<goal>install-node-and-npm</goal>
						</goals>
						<configuration>
							<nodeVersion>v12.16.1</nodeVersion>
							<npmVersion>6.13.4</npmVersion>
						</configuration>
					</execution>
					<execution>
						<id>npm install</id>
						<phase>prepare-package</phase>
						<goals>
							<goal>npm</goal>
						</goals>
						<configuration>
							<arguments>install</arguments>
						</configuration>
					</execution>
					<execution>
						<id>npm run jsdoc</id>
						<phase>prepare-package</phase>
						<goals>
							<goal>npm</goal>
						</goals>
						<configuration>
							<arguments>run jsdoc</arguments>
						</configuration>
					</execution>
					<execution>
						<id>npm run build</id>
						<phase>prepare-package</phase>
						<goals>
							<goal>npm</goal>
						</goals>
						<configuration>
							<arguments>run build</arguments>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-war-plugin</artifactId>
				<configuration>
					<!-- Podczas budowania projektu zostanie utworzony dodatkowy jar: plusworkflow-web-classes.jar -->
					<!-- Plik zawiera klasy - projekt typu war nie może być zależnością -->
					<attachClasses>true</attachClasses>
				</configuration>
				<executions>
					<!--Wyłączenie budowania wara w fazie 'default-war', która jest
					uruchamiana przed fazą 'package', ponieważ przed spakowaniem wara muszą
					się wykonać powyższe pluginy.-->
					<execution>
						<id>default-war</id>
						<phase>none</phase>
						<goals>
							<goal>war</goal>
						</goals>
					</execution>
					<!--War jest pakowany w fazie 'package' po wykonaniu wszystkich powyższych
					pluginów-->
					<execution>
						<id>package-war</id>
						<phase>package</phase>
						<goals>
							<goal>war</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>com.spotify</groupId>
				<artifactId>dockerfile-maven-plugin</artifactId>
				<version>1.4.13</version>
				<configuration>
					<repository>plusworkflow</repository>
					<tag>${project.version}</tag>
				</configuration>
			</plugin>
		</plugins>
	</build>
</project>
