<?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-form</artifactId>
		<version>4.4.0.1</version>
	</parent>

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

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	</properties>

	<dependencies>
		<dependency>
			<groupId>com.suncode</groupId>
			<artifactId>plusworkflow-form-core</artifactId>
			<scope>provided</scope>
		</dependency>
	</dependencies>

	<build>
		<finalName>plusworkflow-form-web</finalName>

		<plugins>
			<plugin>
				<groupId>com.github.eirslett</groupId>
				<artifactId>frontend-maven-plugin</artifactId>
				<executions>
					<execution>
						<id>install node and npm</id>
						<goals>
							<goal>install-node-and-npm</goal>
						</goals>
					</execution>
					<execution>
						<id>npm install</id>
						<goals>
							<goal>npm</goal>
						</goals>
						<configuration>
							<arguments>install</arguments>
						</configuration>
					</execution>
					<execution>
						<id>npm build</id>
						<phase>prepare-package</phase>
						<goals>
							<goal>npm</goal>
						</goals>
						<configuration>
							<arguments>run build</arguments>
						</configuration>
					</execution>
					<execution>
						<id>test</id>
						<phase>test</phase>
						<goals>
							<goal>npm</goal>
						</goals>
						<configuration>
							<arguments>test</arguments>
						</configuration>
					</execution>
					<execution>
						<id>jsdoc</id>
						<phase>prepare-package</phase>
						<goals>
							<goal>npm</goal>
						</goals>
						<configuration>
							<arguments>run jsdoc</arguments>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>

		<pluginManagement>
			<plugins>
				<plugin>
					<artifactId>maven-war-plugin</artifactId>
					<configuration>
						<failOnMissingWebXml>false</failOnMissingWebXml>
						<packagingExcludes>
							scripts/form/app.js,
							scripts/form/app/**,
							scripts/pw/**
						</packagingExcludes>
						<attachClasses>true</attachClasses>
					</configuration>
				</plugin>

			</plugins>
		</pluginManagement>
	</build>
</project>