<?xml version="1.0" encoding="UTF-8"?><!-- Copyright (c) 2018, University of North Carolina at Chapel Hill -->
<!-- Copyright (c) 2015-2017, Dell EMC -->



<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.emc.metalnx</groupId>
		<artifactId>emc-metalnx</artifactId>
		<version>2.0.0</version>
	</parent>

	<artifactId>emc-metalnx-ui-admin</artifactId>

	<dependencies>
		<dependency>
			<groupId>com.emc.metalnx</groupId>
			<artifactId>emc-metalnx-shared</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>javax.servlet-api</artifactId>
		</dependency>

	</dependencies>

	<profiles>
		<profile>
			<id>default-metalnx-template</id>

			<activation>
				<property>
					<name>!metalnx.custom.template</name>
				</property>

			</activation>
			<build>
				<plugins>

					<plugin>
						<artifactId>maven-antrun-plugin</artifactId>
						<executions>
							<execution>
								<phase>validate</phase>
								<configuration>
									<tasks>
									<echo message="copy template from local default" /> 
										<copy overwrite="true"
											file="${project.basedir}/src/main/resources/views/defaultTemplate.html"
											tofile="${project.basedir}/src/main/resources/views/template.html" />
									</tasks>
								</configuration>
								<goals>
									<goal>run</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>custom-metalnx-template</id>

			<activation>
				<property>
					<name>metalnx.custom.template</name>
				</property>

			</activation>
			<build>
				<plugins>

					<plugin>
						<artifactId>maven-antrun-plugin</artifactId>
						<executions>
							<execution>
								<phase>validate</phase>
								<configuration>
									<tasks>
									  <echo message="copy template from ${metalnx.custom.template}" /> 
									
										<copy  overwrite="true" file="${metalnx.custom.template}"
											tofile="${project.basedir}/src/main/resources/views/template.html" />
									</tasks>
								</configuration>
								<goals>
									<goal>run</goal>
								</goals>
							</execution>
						</executions>
					</plugin>

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

	<build>
		<finalName>emc-metalnx-ui-admin</finalName>

		<resources>
			<resource>
				<directory>src/main/resources</directory>
				<includes>
					<include>static/**</include>
					<include>**/*.html</include>
					<include>**/*.xml</include>
					<include>**/*.properties</include>
				</includes>
			</resource>
		</resources>

	</build>

</project>
