<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.smeup</groupId>
		<artifactId>webup-project</artifactId>
		<version>1.10.2</version>
	</parent>
	<artifactId>WebUP</artifactId>
	<packaging>war</packaging>

	<profiles>
		<profile>
			<id>WebUPIT</id>
			<dependencyManagement>
				<dependencies>
					<dependency>
						<groupId>org.jboss.arquillian</groupId>
						<artifactId>arquillian-bom</artifactId>
						<version>1.1.11.Final</version>
						<scope>import</scope>
						<type>pom</type>
					</dependency>
					<dependency>
						<groupId>org.jboss.arquillian.extension</groupId>
						<artifactId>arquillian-drone-bom</artifactId>
						<version>2.0.0.Final</version>
						<type>pom</type>
						<scope>import</scope>
					</dependency>
				</dependencies>
			</dependencyManagement>

			<build>
				<plugins>
					<plugin>
						<artifactId>maven-failsafe-plugin</artifactId>
						<version>2.19.1</version>
						<executions>
							<execution>
								<goals>
									<goal>integration-test</goal>
									<goal>verify</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<!-- <plugin> -->
					<!-- <groupId>nl.geodienstencentrum.maven</groupId> -->
					<!-- <artifactId>sass-maven-plugin</artifactId> -->
					<!-- <version>2.14</version> -->
					<!-- </plugin> -->
					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>build-helper-maven-plugin</artifactId>
						<version>1.12</version>
						<executions>
							<execution>
								<id>add-integration-test-source-as-test-sources</id>
								<phase>generate-test-sources</phase>
								<goals>
									<goal>add-test-source</goal>
								</goals>
								<configuration>
									<sources>
										<source>src/it/java</source>
									</sources>
								</configuration>
							</execution>
							<execution>
								<id>add-integration-test-resources</id>
								<phase>generate-test-resources</phase>
								<goals>
									<goal>add-test-resource</goal>
								</goals>
								<configuration>
									<!-- Configures the resource directory of our integration tests -->
									<resources>
										<!-- Placeholders that are found from the files located in the 
											configured resource directories are replaced with the property values found 
											from the profile specific configuration file. -->
										<resource>
											<filtering>true</filtering>
											<directory>src/it/resources</directory>
										</resource>
									</resources>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
			<dependencies>
				<dependency>
					<groupId>org.jboss.arquillian.junit</groupId>
					<artifactId>arquillian-junit-container</artifactId>
					<scope>test</scope>
				</dependency>
				<dependency>
					<groupId>org.jboss.arquillian.container</groupId>
					<artifactId>arquillian-glassfish-remote-3.1</artifactId>
					<version>1.0.0.Final</version>
					<scope>test</scope>
				</dependency>
				<dependency>
					<groupId>org.jboss.arquillian.graphene</groupId>
					<artifactId>graphene-webdriver</artifactId>
					<version>2.1.0.Final</version>
					<type>pom</type>
					<scope>test</scope>
				</dependency>
				<dependency>
					<groupId>org.seleniumhq.selenium</groupId>
					<artifactId>selenium-firefox-driver</artifactId>
					<version>2.53.1</version>
					<scope>test</scope>
				</dependency>
			</dependencies>
		</profile>
	</profiles>

	<build>
		<plugins>
			<plugin>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.19.1</version>
			</plugin>
			<plugin>
				<groupId>org.codehaus.cargo</groupId>
				<artifactId>cargo-maven2-plugin</artifactId>
				<version>1.5.0</version>
				<configuration>
					<container>
						<containerId>glassfish4x</containerId>
						<type>remote</type>
					</container>
					<!-- deployer configuration -->
					<configuration>
						<type>runtime</type>
						<properties>
							<cargo.hostname>${cargo.hostname}</cargo.hostname>
							<cargo.remote.username>${cargo.remote.username}</cargo.remote.username>
							<cargo.remote.password>${cargo.remote.password}</cargo.remote.password>
							<cargo.glassfish.admin.port>${cargo.remote.port}</cargo.glassfish.admin.port>
						</properties>
					</configuration>
					<deployables>
						<deployable>
							<groupId>${project.groupId}</groupId>
							<artifactId>${project.artifactId}</artifactId>
							<type>war</type>
							<properties>
								<context>${context}</context>
							</properties>
						</deployable>
					</deployables>
				</configuration>
				<dependencies>
					<dependency>
						<groupId>org.glassfish.main.deployment</groupId>
						<artifactId>deployment-client</artifactId>
						<version>4.1.1</version>
					</dependency>
				</dependencies>
			</plugin>
			<plugin>
				<groupId>com.google.code.maven-replacer-plugin</groupId>
				<artifactId>replacer</artifactId>
				<version>1.5.3</version>
				<executions>
					<execution>
						<phase>package</phase>
						<goals>
							<goal>replace</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<basedir>${project.build.directory}</basedir>
					<includes>
						<include>**/*.css</include>
					</includes>
					<replacements>
						<replacement>
							<token>(sourceMappingURL=[\w.]*)</token>
							<value>$1.jsf?ln=web</value>
						</replacement>
					</replacements>
				</configuration>
			</plugin>

		</plugins>
	</build>

	<reporting>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-pmd-plugin</artifactId>
				<version>3.6</version>
				<configuration>
					<targetJdk>1.8</targetJdk>
				</configuration>
			</plugin>
		</plugins>
	</reporting>

	<dependencies>
		<dependency>
			<groupId>com.smeup</groupId>
			<artifactId>WebApp</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>javax</groupId>
			<artifactId>javaee-api</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>com.smeup</groupId>
			<artifactId>LoocupImg</artifactId>
			<version>1.8</version>
		</dependency>
		<dependency>
			<groupId>com.smeup</groupId>
			<artifactId>SVGToPng</artifactId>
			<version>1.3.2</version>
		</dependency>
		<dependency>
			<groupId>com.smeup.themes</groupId>
			<artifactId>webup</artifactId>
			<version>1.0.1</version>
		</dependency>
		<dependency>
			<groupId>org.primefaces.themes</groupId>
			<artifactId>bootstrap</artifactId>
			<version>1.0.10</version>
		</dependency>
		<dependency>
			<groupId>org.hamcrest</groupId>
			<artifactId>hamcrest-all</artifactId>
			<version>1.3</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-all</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>com.auth0</groupId>
			<artifactId>java-jwt</artifactId>
			<version>2.2.1</version>
		</dependency>
	</dependencies>
</project>
