<?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">
  <parent>
    <artifactId>opennms</artifactId>
    <groupId>org.opennms</groupId>
    <version>1.8.17-SNAPSHOT</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>opennms-webapp</artifactId>
  <packaging>war</packaging>
  <name>OpenNMS Web Application</name>
  <properties>
    <moduleName>org.opennms.dashboard.Dashboard</moduleName>
    <moduleHtml>index.html</moduleHtml>
    <web.port>8080</web.port>
  </properties>
  <build>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>gwt-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-clean-plugin</artifactId>
        <version>2.4.1</version>
        <configuration>
          <filesets>
            <fileset>
              <directory>.gwt-cache</directory>
            </fileset>
            <fileset>
              <directory>tomcat</directory>
            </fileset>
          </filesets>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
        <configuration>
          <archiveClasses>true</archiveClasses>
          <webResources>
            <resource>
              <filtering>true</filtering>
              <directory>${basedir}/src/main/web-filtered</directory>
            </resource>
          </webResources>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>castor-maven-plugin</artifactId>
      </plugin>

      <!-- plugin to use to run webapp in an embedded tomcat -->
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>tomcat-maven-plugin</artifactId>
        <version>1.0</version>
        <configuration>
          <path>/${project.artifactId}</path>
          <port>${web.port}</port>
        </configuration>
      </plugin>
      <!-- plugin to use to run webapp in an embedded jetty -->
      <plugin>
        <groupId>org.mortbay.jetty</groupId>
        <artifactId>maven-jetty-plugin</artifactId>
        <configuration>
          <scanIntervalSeconds>10</scanIntervalSeconds>
          <connectors>
            <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
              <port>${web.port}</port>
              <maxIdleTime>60000</maxIdleTime>
            </connector>
          </connectors>
          <systemProperties>
            <systemProperty>
              <name>log4j.configuration</name>
              <value>file:${basedir}/runInPlace-log4j.properties</value>
            </systemProperty>
          </systemProperties>
        </configuration>
      </plugin>

      <plugin>
        <groupId>com.sun.tools.jxc.maven2</groupId>
        <artifactId>maven-jaxb-schemagen-plugin</artifactId>
        <version>1.2</version>
        <configuration>
          <destdir>${project.build.directory}/xsds</destdir>
          <srcdir>${basedir}/src/main/java</srcdir>
          <verbose>false</verbose>
          <includes>
            <include>org/opennms/web/snmpinfo/*.java</include>
          </includes>
          <schemas>
            <schema>
              <namespace>http://xmlns.opennms.org/xsd/config/snmp-info</namespace>
              <file>snmp-info.xsd</file>
            </schema>
          </schemas>
        </configuration>
        <executions>
          <execution>
            <phase>process-sources</phase>
            <goals>
              <goal>generate</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <configuration>
          <descriptors>
            <descriptor>src/assembly/meta-inf.xml</descriptor>
            <descriptor>src/assembly/web-inf.xml</descriptor>
            <descriptor>src/assembly/xsds.xml</descriptor>
          </descriptors>
        </configuration>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <!-- Generates the GWT Container and Nature for GWT projects when eclipse:eclipse is run -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-eclipse-plugin</artifactId>
        <configuration>
          <additionalBuildcommands>
            <buildcommand>org.springframework.ide.eclipse.core.springbuilder</buildcommand>
            <buildcommand>com.google.gwt.eclipse.core.gwtProjectValidator</buildcommand>
          </additionalBuildcommands>
          <additionalProjectnatures>
            <projectnature>org.springframework.ide.eclipse.core.springnature</projectnature>
            <projectnature>com.google.gwt.eclipse.core.gwtNature</projectnature>
          </additionalProjectnatures>
          <classpathContainers>
            <classpathContainer>org.eclipse.jdt.launching.JRE_CONTAINER</classpathContainer>
            <classpathContainer>com.google.gwt.eclipse.core.GWT_CONTAINER</classpathContainer>
          </classpathContainers>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>jspc</id>
      <activation><activeByDefault>true</activeByDefault></activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>maven-jetty-jspc-plugin</artifactId>
            <executions>
              <execution>
                <id>jspc</id>
                <goals>
                  <goal>jspc</goal>
                </goals>
                <configuration>
                  <webXmlFragment>${basedir}/target/web.xml.jspc-insert</webXmlFragment>
                  <generatedClasses>${basedir}/target/jsp-classes</generatedClasses>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
  <dependencies>
    <!-- Sort dependencies by groupId then artifactId, but put dependencies with a groupId of org.opennms first. -->
    <dependency>
      <groupId>org.opennms.dependencies</groupId>
      <artifactId>spring-security-dependencies</artifactId>
      <type>pom</type>
    </dependency>
    <!-- Rancid -->
    <dependency>
      <groupId>org.opennms.dependencies</groupId>
      <artifactId>rancid-dependencies</artifactId>
      <type>pom</type>
    </dependency>
    <dependency>
      <groupId>org.opennms.dependencies</groupId>
      <artifactId>dnsjava-dependencies</artifactId>
      <type>pom</type>
    </dependency>
    <dependency>
      <groupId>org.opennms.dependencies</groupId>
      <artifactId>castor-dependencies</artifactId>
      <type>pom</type>
    </dependency>
    <dependency>
      <groupId>org.opennms</groupId>
      <artifactId>opennms-config</artifactId>
    </dependency>
    <dependency>
      <groupId>org.opennms</groupId>
      <artifactId>opennms-dao</artifactId>
    </dependency>
    <!-- XXX the required test JARs should be moved into a separate project -->
    <dependency>
      <groupId>org.opennms</groupId>
      <artifactId>opennms-dao</artifactId>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.opennms.dependencies</groupId>
      <artifactId>hibernate-dependencies</artifactId>
      <type>pom</type>
    </dependency>
    <dependency>
      <groupId>org.opennms</groupId>
      <artifactId>opennms-javamail-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.opennms</groupId>
      <artifactId>opennms-model</artifactId>
    </dependency>
    <dependency>
      <groupId>org.opennms</groupId>
      <artifactId>opennms-provision-persistence</artifactId>
    </dependency>
    <dependency>
      <groupId>org.opennms</groupId>
      <artifactId>opennms-provision-persistence</artifactId>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.opennms</groupId>
      <artifactId>opennms-provisiond</artifactId>
    </dependency>
    <dependency>
      <groupId>org.opennms</groupId>
      <artifactId>opennms-reporting</artifactId>
    </dependency>
    <dependency>
      <groupId>org.opennms</groupId>
      <artifactId>opennms-rws</artifactId>
    </dependency>
    <dependency>
      <groupId>org.opennms.features</groupId>
      <artifactId>org.opennms.features.instrumentationLogReader</artifactId>
    </dependency>	
    <dependency>
      <groupId>org.opennms.features</groupId>
      <artifactId>org.opennms.features.springframework-security</artifactId>
    </dependency>
    <dependency>
      <groupId>org.opennms</groupId>
      <artifactId>opennms-rrd-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.opennms</groupId>
      <artifactId>opennms-rrd-jrobin</artifactId>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.opennms</groupId>
      <artifactId>opennms-rrdtool-api</artifactId>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.opennms</groupId>
      <artifactId>opennms-web-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.opennms</groupId>
      <artifactId>opennms-services</artifactId>
      <exclusions>
        <exclusion>
          <groupId>org.mortbay.jetty</groupId>
          <artifactId>jetty</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.mortbay.jetty</groupId>
          <artifactId>jetty-util</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.mortbay.jetty</groupId>
          <artifactId>servlet-api</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.opennms.dependencies</groupId>
      <artifactId>spring-dependencies</artifactId>
      <type>pom</type>
    </dependency>
    <dependency>
      <groupId>org.opennms.dependencies</groupId>
      <artifactId>spring-web-dependencies</artifactId>
      <type>pom</type>
    </dependency>
    <dependency>
      <groupId>org.opennms.dependencies</groupId>
      <artifactId>jersey-dependencies</artifactId>
      <type>pom</type>
    </dependency>
    <!-- XXX the required test JARs should be moved into a separate project -->
    <dependency>
      <groupId>org.opennms</groupId>
      <artifactId>opennms-services</artifactId>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.opennms.dependencies</groupId>
      <artifactId>snmp-dependencies</artifactId>
      <type>pom</type>
    </dependency>
    <dependency>
      <groupId>org.opennms.dependencies</groupId>
      <artifactId>javamail-dependencies</artifactId>
      <type>pom</type>
    </dependency>
    <dependency>
      <groupId>org.opennms</groupId>
      <artifactId>opennms-test</artifactId>
    </dependency>
    <dependency>
      <groupId>org.opennms</groupId>
      <artifactId>opennms-util</artifactId>
    </dependency>
    <dependency>
      <groupId>org.opennms.features.reporting</groupId>
      <artifactId>org.opennms.features.reporting.core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.opennms.features.reporting</groupId>
      <artifactId>org.opennms.features.reporting.api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.opennms.features.reporting</groupId>
      <artifactId>org.opennms.features.reporting.availability</artifactId>
    </dependency>
    <dependency>
      <groupId>org.opennms.features.reporting</groupId>
      <artifactId>org.opennms.features.reporting.jasper-reports</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.xmlgraphics</groupId>
      <artifactId>batik-dom</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.xmlgraphics</groupId>
      <artifactId>batik-svg-dom</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.xmlgraphics</groupId>
      <artifactId>batik-transcoder</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.xmlgraphics</groupId>
      <artifactId>batik-xml</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.xmlgraphics</groupId>
      <artifactId>batik-util</artifactId>
    </dependency>
    <!-- GWT Dependencies -->
    <dependency>
      <groupId>org.opennms.dependencies</groupId>
      <artifactId>gwt-dependencies</artifactId>
      <type>pom</type>
    </dependency>
    <dependency>
      <groupId>commons-dbcp</groupId>
      <artifactId>commons-dbcp</artifactId>
    </dependency>
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
    </dependency>
    <dependency>
      <groupId>commons-lang</groupId>
      <artifactId>commons-lang</artifactId>
    </dependency>
    <dependency>
      <groupId>httpunit</groupId>
      <artifactId>httpunit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>jakarta-regexp</groupId>
      <artifactId>jakarta-regexp</artifactId>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>jstl</artifactId>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>servlet-api</artifactId>
    </dependency>
    <dependency>
      <groupId>jwebunit</groupId>
      <artifactId>jwebunit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>net.sf.opencsv</groupId>
      <artifactId>opencsv</artifactId>
    </dependency>
    <dependency>
      <groupId>net.sf.json-lib</groupId>
      <artifactId>json-lib</artifactId>
      <classifier>jdk15</classifier>
    </dependency>
    <dependency>
	<groupId>ognl</groupId>
	  <artifactId>ognl</artifactId>
	  <version>2.6.9</version>
	</dependency>
    <dependency>
      <groupId>org.opennms.tests</groupId>
      <artifactId>org.opennms.tests.mock-elements</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.easymock</groupId>
      <artifactId>easymock</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.extremecomponents</groupId>
      <artifactId>extremecomponents</artifactId>
    </dependency>
    <dependency>
      <groupId>org.opennms.dependencies</groupId>
      <artifactId>quartz-dependencies</artifactId>
      <type>pom</type>
    </dependency>
    <dependency>
      <groupId>org.tuckey</groupId>
      <artifactId>urlrewrite</artifactId>
    </dependency>
    <dependency>
      <groupId>poi</groupId>
      <artifactId>poi</artifactId>
    </dependency>
    <dependency>
      <groupId>postgresql</groupId>
      <artifactId>postgresql</artifactId>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>rome</groupId>
      <artifactId>rome</artifactId>
    </dependency>
    <dependency>
      <groupId>struts</groupId>
      <artifactId>struts</artifactId>
    </dependency>
    <dependency>
      <groupId>taglibs</groupId>
      <artifactId>standard</artifactId>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>xerces</groupId>
      <artifactId>xercesImpl</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.directory.server</groupId>
      <artifactId>apacheds-core</artifactId>
      <version>1.0.2</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.directory.server</groupId>
      <artifactId>apacheds-server-jndi</artifactId>
      <version>1.0.2</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>backport-util-concurrent</groupId>
      <artifactId>backport-util-concurrent</artifactId>
      <version>3.1</version>
      <scope>test</scope>
    </dependency>
    
    <dependency>
      <groupId>com.google.collections</groupId>
      <artifactId>google-collections</artifactId>
    </dependency>
    <dependency>
      <groupId>org.opennms.features</groupId>
      <artifactId>org.opennms.features.system-report</artifactId>
    </dependency>
    <dependency>
      <groupId>org.opennms.features</groupId>
      <artifactId>org.opennms.features.request-tracker</artifactId>
    </dependency>
  </dependencies>
</project>
