<?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>
        <artifactId>org.opennms.features</artifactId>
        <groupId>org.opennms</groupId>
        <version>14.0.2</version>
    </parent>
    <groupId>org.opennms.features</groupId>
    <artifactId>jmxconfiggenerator.webui</artifactId>
    <packaging>bundle</packaging>
    <name>OpenNMS Features JMX Config Generator Web UI</name>
    <url>http://www.opennms.org</url>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <gwt.plugin.version>2.2.0</gwt.plugin.version>
        <guava.version>10.0.1</guava.version>
        <quartz.version>2.1.5</quartz.version>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Bundle-RequiredExecutionEnvironment>JavaSE-1.7</Bundle-RequiredExecutionEnvironment>
                        <Vaadin-Application>org.opennms.features.jmxconfiggenerator.webui.JmxConfigGeneratorApplication</Vaadin-Application>
                        <Vaadin-Alias>/${project.artifactId}</Vaadin-Alias>
                        <Include-Resource>src/main/webapp,{maven-resources}</Include-Resource>
                    </instructions>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.opennms.maven.plugins</groupId>
                <artifactId>features-maven-plugin</artifactId>
                <configuration>
                    <bundles>
                        <bundle>mvn:org.opennms.features/jmxconfiggenerator.webui/${project.version}</bundle>
                        <bundle>wrap:mvn:com.google.guava/guava/${guava.version}</bundle>
                        <bundle>wrap:mvn:org.quartz-scheduler/quartz/${quartz.version}</bundle>
                    </bundles>
                    <features>
                        <feature>vaadin</feature>
                        <feature>jmxconfiggenerator</feature>
                    </features>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                </configuration>
            </plugin>
            <!-- 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>
                    <!-- if you don't specify any modules, the plugin will find them -->
                    <webappDirectory>${project.build.directory}/${project.build.finalName}/VAADIN/widgetsets</webappDirectory>
                    <!--extraJvmArgs>-Xmx1g -Xss1024k -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8998</extraJvmArgs -->
                    <extraJvmArgs>-Xmx1g -Xss1024k</extraJvmArgs>
                    <runTarget>vaadin-prototype</runTarget>
                    <hostedWebapp>${project.build.directory}/${project.build.finalName}</hostedWebapp>
                    <noServer>true</noServer>
                    <port>8080</port>
                    <draftCompile>false</draftCompile>
                    <compileReport>false</compileReport>
                </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>
                <groupId>com.vaadin</groupId>
                <artifactId>vaadin-maven-plugin</artifactId>
                <version>${vaadin.plugin.version}</version>
                <configuration>
                    <draftCompile>false</draftCompile>
                    <compileReport>false</compileReport>
                </configuration>
                <executions>
                    <execution>
                        <configuration>
                            <!-- if you don't specify any modules, the plugin will find them -->
                            <!-- <modules> <module>your.company.gwt.ColorPickerWidgetSet</module> </modules> -->
                        </configuration>
                        <goals>
                            <goal>update-widgetset</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>
        </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>com.vaadin</groupId>
        								<artifactId>vaadin-maven-plugin</artifactId>
        								<versionRange>[1.0.2,)</versionRange>
        								<goals>
        									<goal>update-widgetset</goal>
        								</goals>
        							</pluginExecutionFilter>
        							<action>
        								<ignore></ignore>
        							</action>
        						</pluginExecution>
        						<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>
        						<pluginExecution>
        							<pluginExecutionFilter>
        								<groupId>org.opennms.maven.plugins</groupId>
        								<artifactId>features-maven-plugin</artifactId>
        								<versionRange>[1.0.1,)</versionRange>
        								<goals>
        									<goal>generate-features-xml</goal>
        								</goals>
        							</pluginExecutionFilter>
        							<action>
        								<ignore></ignore>
        							</action>
        						</pluginExecution>
        					</pluginExecutions>
        				</lifecycleMappingMetadata>
        			</configuration>
        		</plugin>
        	</plugins>
        </pluginManagement>
    </build>

    <repositories>
        <repository>
            <id>vaadin-snapshots</id>
            <releases><enabled>false</enabled></releases>
            <snapshots><enabled>true</enabled></snapshots>
            <url>http://maven.opennms.org/content/groups/vaadin-snapshot/</url>
        </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>
            <snapshots><enabled>true</enabled></snapshots>
            <releases><enabled>false</enabled></releases>
            <url>http://maven.opennms.org/content/groups/codehaus.org-snapshot/</url>
        </pluginRepository>
        <pluginRepository>
            <id>vaadin-snapshots</id>
            <snapshots><enabled>true</enabled></snapshots>
            <releases><enabled>false</enabled></releases>
            <url>http://maven.opennms.org/content/groups/vaadin-snapshot/</url>
        </pluginRepository>
    </pluginRepositories>

    <dependencies>
       <dependency>
			<groupId>org.opennms.osgi.features.topology</groupId>
	      	<artifactId>vaadin</artifactId>
	      	<type>pom</type>
	    </dependency>
        <!-- This is also used by gwt-maven-plugin to deduce GWT version number. -->
        <dependency>
            <groupId>com.google.gwt</groupId>
            <artifactId>gwt-user</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.validation</groupId>
            <artifactId>validation-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.validation</groupId>
            <artifactId>validation-api</artifactId>
            <classifier>sources</classifier>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.opennms.features</groupId>
            <artifactId>jmxconfiggenerator</artifactId>
            <version>${project.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>javax.xml.bind</groupId>
                    <artifactId>jaxb-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.sun.xml.bind</groupId>
                    <artifactId>jaxb-impl</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.opennms.dependencies</groupId>
            <artifactId>jaxb-dependencies</artifactId>
            <type>pom</type>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.opennms</groupId>
            <artifactId>opennms-web-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.quartz-scheduler</groupId>
            <artifactId>quartz</artifactId>
            <version>${quartz.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
        </dependency>
        <dependency>
            <groupId>args4j</groupId>
            <artifactId>args4j</artifactId>
            <version>2.0.16</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>
</project>
