<?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/maven-v4_0_0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<parent>
		<relativePath>../topology-map/poms/compiled/</relativePath>
		<groupId>org.opennms.features.topology.build</groupId>
		<artifactId>compiled-bundle-settings</artifactId>
		<version>1.12.5-SNAPSHOT</version>
	</parent>
	<groupId>org.opennms.features</groupId>
	<artifactId>vaadin-node-maps</artifactId>
	<packaging>bundle</packaging>
	<name>OpenNMS Node Maps</name>
	<description>
    OpenNMS Vaadin UI for displaying nodes on geographical maps using assets records.
  </description>
	<properties>
		<bundle.symbolicName>org.opennms.features.vaadin-node-maps</bundle.symbolicName>
		<bundle.namespace>org.opennms.features.vaadin.nodemaps</bundle.namespace>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	</properties>

	<build>
		<plugins>
			<!-- Compiles your custom GWT components with the GWT compiler -->
			<!-- A hosted mode browser for client-side widget debugging can be run 
				with the goal gwt:run after uncommenting the correct line below. A remote 
				debugger can then be connected to port 8998. Note that e.g. a Jetty server 
				should be running with the server side parts - use the goal jetty:run . -->
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>gwt-maven-plugin</artifactId>
				<configuration>
					<webappDirectory>target/gwt/VAADIN/widgetsets</webappDirectory>
					<extraJvmArgs>-Xmx1g -Xss1024k</extraJvmArgs>
				</configuration>
				<executions>
					<execution>
						<goals>
							<goal>resources</goal>
							<goal>compile</goal>
						</goals>
					</execution>
				</executions>
				<dependencies>
					<dependency>
						<groupId>com.google.gwt</groupId>
						<artifactId>gwt-dev</artifactId>
						<version>${gwtVersion}</version>
					</dependency>
					<dependency>
						<groupId>com.google.gwt</groupId>
						<artifactId>gwt-user</artifactId>
						<version>${gwtVersion}</version>
					</dependency>
				</dependencies>
			</plugin>

			<plugin>
				<!--
				 | the following instructions build a simple set of public/private classes into an OSGi bundle
				-->
				<groupId>org.apache.felix</groupId>
				<artifactId>maven-bundle-plugin</artifactId>
				<configuration>
					<instructions>
						<Bundle-SymbolicName>${bundle.symbolicName}</Bundle-SymbolicName>
						<Bundle-Version>${project.version}</Bundle-Version>
						<Export-Package>!${bundle.namespace}.internal.*,${bundle.namespace}.*;version="${project.version}"</Export-Package>
						<Private-Package>${bundle.namespace}.internal.*</Private-Package>
					</instructions>
				</configuration>
			</plugin>

			<plugin>
				<groupId>com.vaadin</groupId>
				<artifactId>vaadin-maven-plugin</artifactId>
				<version>1.0.2</version>
				<executions>
					<execution>
						<configuration></configuration>
						<goals>
							<goal>update-widgetset</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.opennms.maven.plugins</groupId>
				<artifactId>features-maven-plugin</artifactId>
				<configuration>
					<bundles>
						<bundle>mvn:org.opennms.features/vaadin-node-maps/${project.version}</bundle>
						<bundle>mvn:org.opennms.features.geocoder/org.opennms.features.geocoder.google/${project.version}</bundle>
						<bundle>mvn:org.opennms.features.geocoder/org.opennms.features.geocoder.nominatim/${project.version}</bundle>
					</bundles>
					<features>
						<feature>vaadin</feature>
					</features>
				</configuration>
			</plugin>
		</plugins>

		<pluginManagement>
			<plugins>
				<!--This plugin's configuration is used to store Eclipse m2e settings 
					only. It has no influence on the Maven build itself. -->
				<plugin>
					<groupId>org.eclipse.m2e</groupId>
					<artifactId>lifecycle-mapping</artifactId>
					<version>1.0.0</version>
					<configuration>
						<lifecycleMappingMetadata>
							<pluginExecutions>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>org.codehaus.mojo</groupId>
										<artifactId>
											gwt-maven-plugin
										</artifactId>
										<versionRange>
											[2.2.0,)
										</versionRange>
										<goals>
											<goal>resources</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore></ignore>
									</action>
								</pluginExecution>
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.mortbay.jetty</groupId>
					<artifactId>jetty-maven-plugin</artifactId>
					<version>8.1.5.v20120716</version>
					<configuration>
						<contextPath>/opennms</contextPath>
						<scanIntervalSeconds>10</scanIntervalSeconds>
						<systemProperties>
							<systemProperty>
								<name>java.awt.headless</name>
								<value>true</value>
							</systemProperty>
						</systemProperties>
						<connectors>
							<connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
								<port>8088</port>
								<maxIdleTime>60000</maxIdleTime>
							</connector>
						</connectors>
						<requestLog implementation="org.eclipse.jetty.server.NCSARequestLog">
							<filename>target/yyyy_mm_dd.request.log</filename>
							<retainDays>90</retainDays>
							<append>true</append>
							<extended>false</extended>
							<logTimeZone>GMT</logTimeZone>
						</requestLog>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>

	<repositories>
		<repository>
			<id>vaadin-snapshots</id>
			<url>http://maven.opennms.org/content/groups/vaadin-snapshot/</url>
			<releases>
				<enabled>false</enabled>
			</releases>
			<snapshots>
			</snapshots>
		</repository>
		<repository>
			<id>vaadin-addons</id>
			<url>http://maven.opennms.org/content/groups/vaadin.com-addons/</url>
		</repository>
	</repositories>

	<pluginRepositories>
		<pluginRepository>
			<id>codehaus-snapshots</id>
			<url>http://maven.opennms.org/content/groups/codehaus.org-snapshot/</url>
			<snapshots>
			</snapshots>
			<releases>
				<enabled>false</enabled>
			</releases>
		</pluginRepository>
		<pluginRepository>
			<id>vaadin-snapshots</id>
			<url>http://maven.opennms.org/content/groups/vaadin-snapshot/</url>
			<snapshots>
			</snapshots>
			<releases>
				<enabled>false</enabled>
			</releases>
		</pluginRepository>
	</pluginRepositories>

	<dependencies>

		<!-- Vaadin Dependencies -->

		<dependency>
			<groupId>org.opennms.osgi.features.topology</groupId>
			<artifactId>vaadin</artifactId>
			<type>pom</type>
		</dependency>
		<dependency>
			<groupId>com.google.gwt</groupId>
			<artifactId>gwt-user</artifactId>
			<optional>true</optional>
			<scope>provided</scope>
		</dependency>

		<!-- Node Maps Dependencies -->

		<dependency>
			<groupId>org.opennms.features.geocoder</groupId>
			<artifactId>org.opennms.features.geocoder.api</artifactId>
		</dependency>
		<dependency>
			<groupId>org.discotools.gwt.leaflet</groupId>
			<artifactId>gwtl-core</artifactId>
			<version>0.3-ONMS-20130305-1</version>
			<optional>true</optional>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.opennms.dependencies</groupId>
			<artifactId>spring-dependencies</artifactId>
			<scope>provided</scope>
			<type>pom</type>
		</dependency>
		<dependency>
			<groupId>org.opennms.core</groupId>
			<artifactId>org.opennms.core.lib</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.opennms</groupId>
			<artifactId>opennms-config</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.opennms</groupId>
			<artifactId>opennms-dao</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.opennms</groupId>
			<artifactId>opennms-web-api</artifactId>
			<scope>provided</scope>
		</dependency>

		<!-- Tests Dependencies -->

		<dependency>
			<groupId>org.easymock</groupId>
			<artifactId>easymock</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.opennms.features.geocoder</groupId>
			<artifactId>org.opennms.features.geocoder.nominatim</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.powermock</groupId>
			<artifactId>powermock-module-junit4</artifactId>
			<version>1.5</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.powermock</groupId>
			<artifactId>powermock-api-easymock</artifactId>
			<version>1.5</version>
			<scope>test</scope>
		</dependency>  
		<dependency>
		    <groupId>com.googlecode.gwt-test-utils</groupId>
		    <artifactId>gwt-test-utils</artifactId>
		    <version>0.44</version>
		    <scope>test</scope>
		</dependency>
	</dependencies>

</project>
