<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>
		<artifactId>maven-parent</artifactId>
		<groupId>org.gcube.tools</groupId>
		<version>1.0.0</version>
		<relativePath />
	</parent>

	<groupId>org.gcube.application</groupId>
	<artifactId>InteractiveLayers</artifactId>
	<version>2.1.0-3.0.0</version>
	<packaging>jar</packaging>
	<name>InteractiveLayers</name>
	<description>A set of GWT OpenLayers classes which produce Layers with some interactivity.</description>

	<scm>
		<connection>scm:svn:http://svn.d4science.research-infrastructures.eu/gcube/branches/application/InteractiveLayers/2.1/${project.artifactId}</connection>
		<developerConnection>scm:https://svn.d4science.research-infrastructures.eu/gcube/branches/application/InteractiveLayers/2.1/${project.artifactId}</developerConnection>
		<url>http://svn.d4science.research-infrastructures.eu/gcube/gcube/branches/application/InteractiveLayers/2.1/${project.artifactId}</url>
	</scm>


	<properties>
		<!-- Convenience property to set the GWT version -->
		<gwtVersion>2.5.1</gwtVersion>
		<distroDirectory>distro</distroDirectory>
		<!-- GWT needs at least java 1.6 -->
		<maven.compiler.source>1.6</maven.compiler.source>
		<maven.compiler.target>1.6</maven.compiler.target>

		<!-- Don't let your Mac use a crazy non-standard encoding -->
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
	</properties>


	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>org.gcube.distribution</groupId>
				<artifactId>maven-portal-bom</artifactId>
				<version>LATEST</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>


	<dependencies>
		<!-- Google Web Toolkit (GWT) -->
		<dependency>
			<groupId>com.google.gwt</groupId>
			<artifactId>gwt-user</artifactId>
			<!-- "provided" so that we don't deploy -->
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.gwtopenmaps.openlayers</groupId>
			<artifactId>gwt-openlayers-client</artifactId>
			<version>0.6</version>
			<scope>provided</scope>
		</dependency>
		
	</dependencies>

	<build>

		<!-- tell Maven to package you JS files as resources -->
		<resources>
			<resource>
				<directory>src/main/java/org/visualisation/public</directory>
				<!-- true or false depending on your taste :-) -->
				<filtering>false</filtering>
			</resource>
		</resources>  
	
		<plugins>

<!--  			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<executions>
					<execution>
						<id>make-a-jar</id>
						<phase>package</phase>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<classesDirectory>${project.build.outputDirectory}</classesDirectory>
					<outputDirectory>target</outputDirectory>
					<includes>
						<include>../../src/main/java/org/visualisation/public/**</include>
						<include>../../src/main/webapp/**</include>
						<include>**/*</include>
					</includes>
				</configuration>
			</plugin>
-->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-resources-plugin</artifactId>
				<version>2.5</version>
				<executions>
					<execution>
						<id>copy-profile</id>
						<phase>install</phase>
						<goals>
							<goal>copy-resources</goal>
						</goals>
						<configuration>
							<outputDirectory>target</outputDirectory>
							<resources>
								<resource>
									<directory>${distroDirectory}</directory>
									<filtering>true</filtering>
									<includes>
								   <!-- <include>../../src/main/java/org/visualisation/public/**</include> -->
										<include>profile.xml</include>
									</includes>
								</resource>
							</resources>
						</configuration>
					</execution>
				</executions>
			</plugin>
	
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-assembly-plugin</artifactId>
				<configuration>
					<descriptors>
						<descriptor>${distroDirectory}/descriptor.xml</descriptor>
					</descriptors>
				</configuration>
				<executions>
					<execution>
						<id>servicearchive</id>
						<phase>install</phase>
						<goals>
							<goal>single</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			
	 	
			
			<!-- <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> 
				<configuration> <webXml>war\WEB-INF\web.xml</webXml> </configuration> </plugin> -->
				
			<!-- GWT Maven Plugin -->
			
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>gwt-maven-plugin</artifactId>
				<version>2.5.1</version>

				<dependencies>
					<dependency>
						<groupId>com.google.gwt</groupId>
						<artifactId>gwt-user</artifactId>
						<version>${gwtVersion}</version>
					</dependency>
					<dependency>
						<groupId>com.google.gwt</groupId>
						<artifactId>gwt-dev</artifactId>
						<version>${gwtVersion}</version>
					</dependency>
				</dependencies>
				<!-- JS is only needed in the package phase, this speeds up testing -->
				<executions>
					<execution>
						<phase>prepare-package</phase>
						<goals>
							<goal>resources</goal>
							<goal>compile</goal>
						</goals>
					</execution>
				</executions>
				<!-- Plugin configuration. There are many available options, see gwt-maven-plugin 
					documentation at codehaus.org -->
				<configuration>
				</configuration>
			</plugin>

		</plugins>

	</build>

</project>