<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.13.3</version>
	</parent>
	<artifactId>WebUP</artifactId>
	<packaging>war</packaging>

	<profiles>
		<profile>
			<id>WebUPIT</id>
			<dependencyManagement>
				<dependencies>
					<dependency>
						<groupId>org.jboss.arquillian.selenium</groupId>
						<artifactId>selenium-bom</artifactId>
						<version>3.4.0</version>
						<type>pom</type>
						<scope>import</scope>
					</dependency>
					<dependency>
						<groupId>org.jboss.arquillian</groupId>
						<artifactId>arquillian-bom</artifactId>
						<version>1.1.13.Final</version>
						<scope>import</scope>
						<type>pom</type>
					</dependency>
					<dependency>
						<groupId>org.jboss.arquillian.extension</groupId>
						<artifactId>arquillian-drone-bom</artifactId>
						<version>2.1.2</version>
						<type>pom</type>
						<scope>import</scope>
					</dependency>
				</dependencies>
			</dependencyManagement>

			<build>
				<plugins>
					<plugin>
						<artifactId>maven-failsafe-plugin</artifactId>
						<version>2.20</version>
						<executions>
							<execution>
								<goals>
									<goal>integration-test</goal>
									<goal>verify</goal>
								</goals>
							</execution>
						</executions>
						<configuration>
							<forkCount>1C</forkCount>
							<argLine>-Xmx1024m</argLine>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>build-helper-maven-plugin</artifactId>
						<version>3.0.0</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.2.1</version>
					<type>pom</type>
					<scope>test</scope>
				</dependency>
			</dependencies>
		</profile>

		<profile>
			<id>WebUPFE</id>
			<build>
				<plugins>
					<plugin>
						<groupId>nl.geodienstencentrum.maven</groupId>
						<artifactId>sass-maven-plugin</artifactId>
						<version>2.23</version>
						<executions>
							<execution>
								<phase>prepare-package</phase>
								<goals>
									<goal>update-stylesheets</goal>
								</goals>
							</execution>
						</executions>
						<configuration>
							<resources>
								<resource>
									<source>
										<directory>${project.basedir}/src/main/webapp/resources/web/scss</directory>
									</source>
									<destination>${project.basedir}/src/main/webapp/resources/web/css</destination>
								</resource>
								<resource>
									<source>
										<directory>${project.basedir}/src/main/webapp/resources/mobile/scss</directory>
									</source>
									<destination>${project.basedir}/src/main/webapp/resources/mobile/css</destination>
								</resource>
							</resources>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

	<build>
		<plugins>
			<plugin>
				<groupId>org.codehaus.cargo</groupId>
				<artifactId>cargo-maven2-plugin</artifactId>
				<version>1.6.3</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.2</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>

	<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.10.0</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>com.auth0</groupId>
			<artifactId>java-jwt</artifactId>
			<version>2.2.2</version>
		</dependency>
		<dependency>
			<groupId>io.swagger</groupId>
			<artifactId>swagger-jersey2-jaxrs</artifactId>
			<version>1.5.13</version>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-simple</artifactId>
			<version>1.7.25</version>
		</dependency>
		<dependency>
			<groupId>org.eu.ingwar.tools</groupId>
			<artifactId>arquillian-suite-extension</artifactId>
			<version>1.1.4</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>com.google.guava</groupId>
			<artifactId>guava</artifactId>
			<version>22.0</version>
		</dependency>
		<dependency>
			<groupId>com.google.maps</groupId>
			<artifactId>google-maps-services</artifactId>
			<version>0.1.20</version>
		</dependency>
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-lang3</artifactId>
			<version>3.5</version>
		</dependency>
	</dependencies>
</project>