<?xml version="1.0" encoding="UTF-8"?>
<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">
	<parent>
		<artifactId>wlan-portal</artifactId>
		<groupId>com.tomasteubner</groupId>
		<version>1.8-SNAPSHOT</version>
	</parent>
	<modelVersion>4.0.0</modelVersion>

	<artifactId>wlan-portal-ui</artifactId>
  <version>1.8-SNAPSHOT</version>
	<name>wlan-portal-ui</name>
	<packaging>war</packaging>

	<properties>
		<build.timestamp>${maven.build.timestamp}</build.timestamp>
		<build.timestamp.format>yyyy-MM-dd HH:mm</build.timestamp.format>
	</properties>
	
	<dependencies>
		<!-- Backend implementation -->
		<dependency>
			<groupId>${project.groupId}</groupId>
			<artifactId>wlan-portal-backend</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>com.tomasteubner.vaadin</groupId>
			<artifactId>web-widgetset</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>com.tomasteubner</groupId>
			<artifactId>web-util</artifactId>
			<version>${project.version}</version>
		</dependency>
		<!-- Testing -->
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>${project.groupId}</groupId>
			<artifactId>eap-controller-tplink</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>de.steinwedel.vaadin.addon</groupId>
			<artifactId>messagebox</artifactId>
		</dependency>
	</dependencies>

	<build>
		<resources>
			<resource>
				<directory>src/main/resources</directory>
				<filtering>true</filtering>
			</resource>
		</resources>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-war-plugin</artifactId>
				<configuration>
					<failOnMissingWebXml>false</failOnMissingWebXml>
                    <!-- By attaching the classes to a separate JAR, we can 
                        import them directly in the production overlay project, making it easier 
                        to compile a separate widgetset for production mode. -->
                    <attachClasses>true</attachClasses>
                    <!-- Exclude some unnecessary files generated by the 
                        GWT compiler. -->
                    <packagingExcludes>WEB-INF/classes/VAADIN/gwt-unitCache/**,
                        WEB-INF/classes/VAADIN/widgetsets/WEB-INF/**</packagingExcludes>
				</configuration>
			</plugin>
			<plugin>
				<groupId>com.vaadin</groupId>
				<artifactId>vaadin-maven-plugin</artifactId>
                <configuration>
                    <extraJvmArgs>-Xmx512M -Xss1024k</extraJvmArgs>
                    <webappDirectory>${basedir}/target/classes/VAADIN/widgetsets</webappDirectory>
                    <draftCompile>false</draftCompile>
                    <compileReport>false</compileReport>
                    <style>OBF</style>
                    <strict>true</strict>
                </configuration>
				<executions>
					<execution>
						<goals>
							<!-- Widgetset goals for add-ons, including wlan-portal-addon -->
							<goal>update-widgetset</goal>
							<goal>compile</goal>

							<goal>update-theme</goal>
							<!-- Comment out compile-theme goal to use on-the-fly theme compilation -->
							<goal>compile-theme</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
            <plugin>
            	<groupId>org.springframework.boot</groupId>
            	<artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
 		</plugins>
	</build>

</project>
