<?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>19.0.0-SNAPSHOT</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>opennms-webapp</artifactId>
  <packaging>war</packaging>
  <name>OpenNMS Web Application</name>
  <properties>
    <frontendPluginVersion>1.0</frontendPluginVersion>
    <nodeVersion>v5.8.0</nodeVersion>
    <npmVersion>3.7.1</npmVersion>
    <moduleName>org.opennms.dashboard.Dashboard</moduleName>
    <moduleHtml>index.html</moduleHtml>
    <web.port>8080</web.port>
    <!-- this is used by runInPlace.sh to get the overwise provided 
         nms libs into the WEB-INF/lib for jetty -->
    <onmsLibScope>provided</onmsLibScope>
  </properties>
  <build>
    <plugins>
      <plugin>
        <!-- https://github.com/eirslett/frontend-maven-plugin -->
        <groupId>com.github.eirslett</groupId>
        <artifactId>frontend-maven-plugin</artifactId>
        <version>${frontendPluginVersion}</version>
        <configuration>
          <nodeDownloadRoot>http://mirror.internal.opennms.com/nodejs/dist/</nodeDownloadRoot>
          <npmDownloadRoot>http://mirror.internal.opennms.com/npmjs/npm/-/</npmDownloadRoot>
          <installDirectory>target</installDirectory>
          <triggerfiles>
            <triggerfile>package.json</triggerfile>
          </triggerfiles>
        </configuration>
        <executions>
          <execution>
            <id>install node and npm</id>
            <goals>
              <goal>install-node-and-npm</goal>
            </goals>
            <phase>generate-resources</phase>
            <configuration>
              <nodeVersion>${nodeVersion}</nodeVersion>
              <npmVersion>${npmVersion}</npmVersion>
            </configuration>
          </execution>
          <execution>
            <id>install nodejs dependencies</id>
            <goals>
              <goal>npm</goal>
            </goals>
            <phase>generate-resources</phase>
            <configuration>
              <arguments>install</arguments>
            </configuration>
          </execution>
          <execution>
            <id>install bower dependencies</id>
            <goals>
              <goal>bower</goal>
            </goals>
            <phase>generate-resources</phase>
            <configuration>
              <arguments>install --allow-root</arguments>
            </configuration>
          </execution>
          <execution>
            <id>copy third-party dependencies</id>
            <goals>
              <goal>gulp</goal>
            </goals>
            <phase>generate-resources</phase>
            <configuration>
              <arguments>vendor</arguments>
            </configuration>
          </execution>
          <execution>
            <id>execute karma tests</id>
            <goals>
              <goal>karma</goal>
            </goals>
            <phase>generate-resources</phase>
            <configuration>
              <arguments>start</arguments>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.jasig.maven</groupId>
        <artifactId>sass-maven-plugin</artifactId>
        <version>${sass.maven.plugin.version}</version>
        <executions>
          <execution>
            <goals><goal>update-stylesheets</goal></goals>
            <phase>generate-resources</phase>
          </execution>
        </executions>
        <configuration>
          <sassSourceDirectory>${basedir}/src/main/scss</sassSourceDirectory>
          <destination>${project.build.directory}/${project.build.finalName}/css</destination>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <phase>test-compile</phase>
            <goals><goal>copy</goal></goals>
          </execution>
        </executions>
        <configuration>
          <artifactItems>
            <artifactItem>
              <groupId>org.opennms.dependencies</groupId>
              <artifactId>jaxb-dependencies</artifactId>
              <type>pom</type>
              <overWrite>false</overWrite>
              <outputDirectory>${basedir}/target/endorsed</outputDirectory>
            </artifactItem>
          </artifactItems>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-clean-plugin</artifactId>
        <configuration>
          <filesets>
            <fileset>
              <directory>tomcat</directory>
            </fileset>
          </filesets>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
        <configuration>
          <archiveClasses>true</archiveClasses>
          <archive>
            <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
          </archive>
          <webResources>
            <resource>
              <filtering>true</filtering>
              <directory>${basedir}/src/main/web-filtered</directory>
            </resource>
          </webResources>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <extensions>true</extensions>
        <executions>
          <execution>
            <id>bundle-manifest</id>
            <phase>process-classes</phase>
            <goals>
              <goal>manifest</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <supportedProjectTypes>
            <supportedProjectType>bundle</supportedProjectType>
            <supportedProjectType>jar</supportedProjectType>
            <supportedProjectType>war</supportedProjectType>
          </supportedProjectTypes>
          <instructions>
            <Bundle-RequiredExecutionEnvironment>JavaSE-1.8</Bundle-RequiredExecutionEnvironment>
            <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
            <Bundle-Version>${project.version}</Bundle-Version>

            <!-- Specify the servlet path for the WAR -->
            <Webapp-Context>opennms</Webapp-Context> <!-- Deprecated -->
            <Web-ContextPath>opennms</Web-ContextPath>

            <!--
              Add the webapp JAR itself and WEB-INF/classes to the bundle classpath. 
              All embedded JAR files will be appended to this list as well.
            -->
            <Bundle-ClassPath>.,WEB-INF/classes,WEB-INF/lib/opennms-webapp-${project.version}.jar</Bundle-ClassPath>
            <!-- Directory that will hold embedded dependency JAR files -->
            <Embed-Directory>WEB-INF/lib</Embed-Directory>
            <!--
              Embed everything with 'compile' or 'runtime' scope. Dependencies with 'provided' scope will be loaded out of OSGi 
              or from the shared classpath of /opt/opennms/lib.
            -->
            <Embed-Dependency>*;scope=compile|runtime</Embed-Dependency>
            <!-- Embed transitive dependencies in WEB-INF/lib -->
            <Embed-Transitive>true</Embed-Transitive>

            <Import-Package>
              <!-- 
                These are required classes that are not autodetected by bnd from:
                  - web.xml
                  - Spring
              -->
              org.eclipse.jetty.servlet,
              org.opennms.core.soa.config,
              org.springframework.beans.factory.config;version="[4.0,5)",
              org.springframework.context.config;version="[4.0,5)",
              org.springframework.context.support;version="[4.0,5)",
              org.springframework.js.resource, <!-- No version because webflow is a wrapped dep :/ -->
              org.springframework.orm.hibernate3.support;version="[4.0,5)",
              <!-- Spring Security namespace handler -->
              org.springframework.security.config;version="[3.2,4)",
              org.springframework.security.web.authentication;version="[3.2,4)",
              org.springframework.transaction.config;version="[4.0,5)",
              org.springframework.web.context;version="[4.0,5)",
              org.springframework.web.filter;version="[4.0,5)",

              <!-- Spring Web Flow -->
              <!-- There are no versions here because the webflow JAR is a wrapped dep :/ -->
              org.springframework.webflow.expression,
              org.springframework.webflow.expression.el,
              org.springframework.webflow.expression.spel,
              org.springframework.webflow.scope,
              org.springframework.webflow.security,
              org.springframework.webflow.engine,
              org.springframework.webflow.engine.builder,
              org.springframework.webflow.engine.builder.model,
              org.springframework.webflow.engine.builder.support,
              org.springframework.webflow.engine.impl,
              org.springframework.webflow.engine.model,
              org.springframework.webflow.engine.model.registry,
              org.springframework.webflow.engine.model.builder,
              org.springframework.webflow.engine.model.builder.xml,
              org.springframework.webflow.engine.support,
              org.springframework.webflow.conversation,
              org.springframework.webflow.conversation.impl,
              org.springframework.webflow.mvc,
              org.springframework.webflow.mvc.portlet,
              org.springframework.webflow.mvc.builder,
              org.springframework.webflow.mvc.view,
              org.springframework.webflow.mvc.servlet,
              org.springframework.webflow.persistence,
              org.springframework.webflow.context,
              org.springframework.webflow.context.web,
              org.springframework.webflow.context.portlet,
              org.springframework.webflow.context.servlet,
              org.springframework.webflow.validation,
              org.springframework.webflow.action,
              org.springframework.webflow.execution,
              org.springframework.webflow.execution.factory,
              org.springframework.webflow.execution.repository,
              org.springframework.webflow.execution.repository.snapshot,
              org.springframework.webflow.execution.repository.impl,
              org.springframework.webflow.execution.repository.support,
              org.springframework.webflow.test,
              org.springframework.webflow.test.execution,
              org.springframework.webflow.config,
              org.springframework.webflow.executor,
              org.springframework.webflow.core,
              org.springframework.webflow.core.collection,
              org.springframework.webflow.upgrade,
              org.springframework.webflow.definition,
              org.springframework.webflow.definition.registry,

              <!-- Mark some packages that dependency JARs rely on as optional -->
              <!-- Optional dependencies of jdom -->
              oracle.xml*;resolution:=optional,
              org.jaxen*;resolution:=optional,
              <!-- Optional dependencies on old JAXP implementations -->
              com.sun.org.apache*;resolution:=optional,
              <!-- Optional dependency on Tomcat taglibs -->
              org.apache.taglibs*;resolution:=optional,
              <!-- These are probably optional dependencies of BSF -->
              org.mozilla.javascript;resolution:=optional,
              org.python.core;resolution:=optional,
              org.python.util;resolution:=optional,

              <!-- Exclude some deprecated packages that get detected by bnd -->
              <!-- Exclude FOP 0.20.0 package -->
              !org.apache.fop.messaging,
              <!-- Deprecated dependency on Apache Avalon LogKit -->
              !org.apache.log,
              <!-- Exclude sitemesh, not sure where the hell it is coming from -->
              !com.opensymphony.module.sitemesh.filter,
              <!-- Exclude JUnit, not sure where the hell it is coming from -->
              !junit*,
              <!-- Exclude Gilead, it is an optional GWT dependency -->
              !net.sf.gilead*,
              <!-- This is a spurious code generation dependency -->
              !org.zeroturnaround.javarebel,
              *
            </Import-Package>
            <!-- 
              TODO: Exclude all packages from export to get the webapp to load.
              This needs to be changed to allow the webapp to function. We need to resolve
              package conflicts between opennms-webapp and other projects.
            -->
            <Export-Package>
              <!--
              org.opennms.web.account.selfService,
              org.opennms.web.admin.discovery,
              org.opennms.web.admin.nodeManagement,
              org.opennms.web.admin.notification,
              org.opennms.web.admin.roles,
              org.opennms.web.admin.users,
              org.opennms.web.alarm,
              org.opennms.web.asset,
              org.opennms.web.category,
              org.opennms.web.element,
              org.opennms.web.event,
              org.opennms.web.graph,
              org.opennms.web.mail,
              org.opennms.web.nodelabel
              -->
              !*
            </Export-Package>
          </instructions>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.opennms.maven.plugins</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.1</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.eclipse.jetty</groupId>
        <artifactId>jetty-maven-plugin</artifactId>
        <configuration>
          <contextPath>/opennms</contextPath>
          <scanIntervalSeconds>10</scanIntervalSeconds>
          <connectors>
            <connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
              <port>${web.port}</port>
              <maxIdleTime>60000</maxIdleTime>
            </connector>
          </connectors>
        </configuration>
      </plugin>

      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <configuration>
          <descriptors>
            <descriptor>src/assembly/meta-inf.xml</descriptor>
            <descriptor>src/assembly/xsds.xml</descriptor>
          </descriptors>
          <tarLongFileMode>posix</tarLongFileMode>
        </configuration>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <executions>
            <execution>
                <id>attach-artifacts</id>
                <phase>package</phase>
                <goals>
                    <goal>attach-artifact</goal>
                </goals>
                <configuration>
                    <artifacts>
                        <artifact>
                            <file>target/opennms-webapp-${project.version}/WEB-INF/lib/opennms-webapp-${project.version}.jar</file>
                            <type>jar</type>
                        </artifact>
                    </artifacts>
                </configuration>
            </execution>
            <execution>
              <id>add-source</id>
              <phase>generate-sources</phase>
              <goals>
                <goal>add-source</goal>
              </goals>
              <configuration>
                <sources>
                  <source>${project.build.directory}/generated-sources/castor</source>
                </sources>
              </configuration>
            </execution>
        </executions>
      </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.apache.maven.plugins</groupId>
    								<artifactId>maven-dependency-plugin</artifactId>
    								<versionRange>[2.4,)</versionRange>
    								<goals><goal>copy</goal></goals>
    							</pluginExecutionFilter>
    							<action><ignore/></action>
    						</pluginExecution>
    						<pluginExecution>
    							<pluginExecutionFilter>
    								<groupId>org.jasig.maven</groupId>
    								<artifactId>sass-maven-plugin</artifactId>
    								<versionRange>[${sass.maven.plugin.version},)</versionRange>
    								<goals><goal>update-stylesheets</goal></goals>
    							</pluginExecutionFilter>
    							<action><ignore/></action>
    						</pluginExecution>
    					</pluginExecutions>
    				</lifecycleMappingMetadata>
    			</configuration>
    		</plugin>
    	</plugins>
    </pluginManagement>
  </build>
  <profiles>
    <profile>
      <id>runInPlace</id>
      <activation><activeByDefault>false</activeByDefault></activation>
      <properties>
    		<onmsLibScope>compile</onmsLibScope>
      </properties>
      <dependencies>
        <dependency>
          <groupId>org.apache.logging.log4j</groupId>
          <artifactId>log4j-api</artifactId>
          <version>${log4j2Version}</version>
          <scope>runtime</scope>
        </dependency>
        <dependency>
          <groupId>org.apache.logging.log4j</groupId>
          <artifactId>log4j-core</artifactId>
          <version>${log4j2Version}</version>
          <scope>runtime</scope>
        </dependency>
        <dependency>
          <groupId>org.apache.logging.log4j</groupId>
          <artifactId>log4j-1.2-api</artifactId>
          <version>${log4j2Version}</version>
          <scope>runtime</scope>
        </dependency>
        <dependency>
          <groupId>org.apache.logging.log4j</groupId>
          <artifactId>log4j-slf4j-impl</artifactId>
          <version>${log4j2Version}</version>
          <scope>runtime</scope>
        </dependency>
      </dependencies>
    </profile>
    <profile>
      <id>jspc</id>
      <activation><activeByDefault>true</activeByDefault></activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-jspc-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>jspc</id>
                <goals>
                  <goal>jspc</goal>
                </goals>
                <configuration>
                  <keepSources>true</keepSources>
                  <webXmlFragment>${basedir}/target/web.xml.jspc-insert</webXmlFragment>
                  <generatedClasses>${basedir}/target/jsp-classes</generatedClasses>
                  <useProvidedScope>true</useProvidedScope>
                  <tldJarNamePatterns>.*\.jar$</tldJarNamePatterns>
                </configuration>
              </execution>
            </executions>
            <!-- add some jars to the plugin classpath so they can be searched for .tld files -->
            <dependencies>
              <dependency>
                <groupId>org.opennms.dependencies</groupId>
                <artifactId>spring-web-dependencies</artifactId>
                <type>pom</type>
                <version>${project.version}</version>
              </dependency>
              <dependency>
                <groupId>org.opennms.dependencies</groupId>
                <artifactId>spring-security-dependencies</artifactId>
                <type>pom</type>
                <version>${project.version}</version>
              </dependency>
              <dependency>
                <groupId>org.extremecomponents</groupId>
                <artifactId>extremecomponents</artifactId>
                <version>1.0.1</version>
                <exclusions>
                  <exclusion>
                    <groupId>taglibs</groupId>
                    <artifactId>standard</artifactId>
                  </exclusion>
                </exclusions>
              </dependency>
            </dependencies>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
  <dependencies>

    <!-- indirect OpenNMS dependencies that belong in $OPENNMS_HOME/lib -->
    <!-- these should all be <scope>${onmsLibScope}</scope> and also included in opennms-base-assembly -->

    <dependency>
      <groupId>org.opennms</groupId>
      <artifactId>opennms-dao</artifactId>
      <scope>${onmsLibScope}</scope>
    </dependency>
    <dependency>
      <groupId>org.opennms</groupId>
      <artifactId>opennms-web-api</artifactId>
      <scope>${onmsLibScope}</scope>
    </dependency>
    <dependency>
      <groupId>org.opennms</groupId>
      <artifactId>opennms-reporting</artifactId>
      <scope>${onmsLibScope}</scope>
    </dependency>
    <dependency>
      <groupId>org.opennms</groupId>
      <artifactId>opennms-provision-persistence</artifactId>
      <scope>${onmsLibScope}</scope>
    </dependency>
    <dependency>
      <groupId>org.opennms</groupId>
      <artifactId>opennms-rrd-jrobin</artifactId>
      <scope>${onmsLibScope}</scope>
    </dependency>
    <dependency>
      <groupId>org.opennms.dependencies</groupId>
      <artifactId>jrrd2-dependencies</artifactId>
      <scope>${onmsLibScope}</scope>
      <type>pom</type>
    </dependency>
    <dependency>
      <groupId>org.opennms</groupId>
      <artifactId>opennms-rrdtool-api</artifactId>
      <scope>${onmsLibScope}</scope>
    </dependency>
    <dependency>
      <groupId>org.opennms</groupId>
      <artifactId>opennms-web-dependencies</artifactId>
      <type>pom</type>
      <scope>${onmsLibScope}</scope>
    </dependency>
    <dependency>
      <groupId>org.opennms.core</groupId>
      <artifactId>org.opennms.core.soa</artifactId>
      <scope>${onmsLibScope}</scope>
    </dependency>
    <dependency>
      <groupId>org.opennms.core</groupId>
      <artifactId>org.opennms.core.db</artifactId>
      <scope>${onmsLibScope}</scope>
    </dependency>
    <dependency>
      <groupId>org.opennms.core</groupId>
      <artifactId>org.opennms.core.config</artifactId>
      <scope>${onmsLibScope}</scope>
    </dependency>
    <dependency>
      <groupId>org.opennms.dependencies</groupId>
      <artifactId>felix-dependencies</artifactId>
      <type>pom</type>
      <scope>${onmsLibScope}</scope>
    </dependency>
    <dependency>
      <groupId>org.opennms.dependencies</groupId>
      <artifactId>rancid-dependencies</artifactId>
      <type>pom</type>
      <scope>${onmsLibScope}</scope>
    </dependency>
    <dependency>
      <groupId>org.opennms.dependencies</groupId>
      <artifactId>snmp-dependencies</artifactId>
      <type>pom</type>
      <scope>${onmsLibScope}</scope>
    </dependency>
    <dependency>
      <groupId>org.opennms.features</groupId>
      <artifactId>org.opennms.features.instrumentationLogReader</artifactId>
      <scope>${onmsLibScope}</scope>
    </dependency>   
    <dependency>
      <groupId>org.opennms.features</groupId>
      <artifactId>org.opennms.features.discovery</artifactId>
      <version>${project.version}</version>
      <scope>${onmsLibScope}</scope>
    </dependency>
    <dependency>
      <groupId>org.opennms.features.poller</groupId>
      <artifactId>org.opennms.features.poller.remote</artifactId>
      <scope>${onmsLibScope}</scope>
    </dependency>
    <dependency>
      <groupId>org.opennms.features.reporting</groupId>
      <artifactId>org.opennms.features.reporting.core</artifactId>
      <scope>${onmsLibScope}</scope>
    </dependency>
    <dependency>
      <groupId>org.opennms.features.reporting</groupId>
      <artifactId>org.opennms.features.reporting.api</artifactId>
      <scope>${onmsLibScope}</scope>
    </dependency>
    <dependency>
      <groupId>org.opennms.features.reporting</groupId>
      <artifactId>org.opennms.features.reporting.availability</artifactId>
      <scope>${onmsLibScope}</scope>
    </dependency>
    <dependency>
      <groupId>org.opennms.features.reporting</groupId>
      <artifactId>org.opennms.features.reporting.model</artifactId>
      <scope>${onmsLibScope}</scope>
    </dependency>
    <dependency>
      <groupId>org.opennms.features.reporting</groupId>
      <artifactId>org.opennms.features.reporting.dao</artifactId>
      <scope>${onmsLibScope}</scope>
    </dependency>
    <dependency>
      <groupId>org.opennms.features.reporting</groupId>
      <artifactId>org.opennms.features.reporting.repository</artifactId>
      <scope>${onmsLibScope}</scope>
    </dependency>
    <dependency>
      <groupId>org.opennms.features</groupId>
      <artifactId>org.opennms.features.request-tracker</artifactId>
      <scope>${onmsLibScope}</scope>
    </dependency>
    <dependency>
      <groupId>org.opennms.features</groupId>
      <artifactId>org.opennms.features.springframework-security</artifactId>
      <scope>${onmsLibScope}</scope>
    </dependency>
    <dependency>
      <groupId>org.opennms.features</groupId>
      <artifactId>org.opennms.features.system-report</artifactId>
      <scope>${onmsLibScope}</scope>
    </dependency>
    <dependency>
      <groupId>org.opennms.features.bsm</groupId>
      <artifactId>org.opennms.features.bsm.service.api</artifactId>
      <version>${project.version}</version>
      <scope>${onmsLibScope}</scope>
    </dependency>
    <dependency>
      <groupId>org.opennms.features</groupId>
      <artifactId>org.opennms.features.graphml</artifactId>
      <version>${project.version}</version>
      <scope>${onmsLibScope}</scope>
    </dependency>
    <dependency>
      <groupId>org.opennms.features.measurements</groupId>
      <artifactId>org.opennms.features.measurements.impl</artifactId>
      <version>${project.version}</version>
      <scope>${onmsLibScope}</scope>
    </dependency>

    <!-- indirect 3rd-party dependencies that belong in $OPENNMS_HOME/lib -->
    <!-- these should all be <scope>${onmsLibScope}</scope> and also included in opennms-base-assembly -->

    <dependency>
      <groupId>commons-beanutils</groupId>
      <artifactId>commons-beanutils</artifactId>
      <scope>${onmsLibScope}</scope>
    </dependency>
    <dependency>
      <groupId>commons-collections</groupId>
      <artifactId>commons-collections</artifactId>
      <scope>${onmsLibScope}</scope>
    </dependency>
    <dependency>
      <groupId>commons-digester</groupId>
      <artifactId>commons-digester</artifactId>
      <scope>${onmsLibScope}</scope>
    </dependency>
    <dependency>
      <groupId>commons-lang</groupId>
      <artifactId>commons-lang</artifactId>
      <scope>${onmsLibScope}</scope>
    </dependency>
    <dependency>
      <groupId>commons-validator</groupId>
      <artifactId>commons-validator</artifactId>
      <scope>${onmsLibScope}</scope>
    </dependency>
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
      <scope>${onmsLibScope}</scope>
    </dependency>
    <dependency>
      <groupId>net.sf.json-lib</groupId>
      <artifactId>json-lib</artifactId>
      <classifier>jdk15</classifier>
      <scope>${onmsLibScope}</scope>
      <exclusions>
        <exclusion>
          <groupId>commons-logging</groupId>
          <artifactId>commons-logging</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>net.sf.opencsv</groupId>
      <artifactId>opencsv</artifactId>
    </dependency>
    <dependency>
      <groupId>ognl</groupId>
      <artifactId>ognl</artifactId>
      <scope>${onmsLibScope}</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-jexl</artifactId>
      <scope>${onmsLibScope}</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.xmlgraphics</groupId>
      <artifactId>batik-dom</artifactId>
      <scope>${onmsLibScope}</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.xmlgraphics</groupId>
      <artifactId>batik-svg-dom</artifactId>
      <scope>${onmsLibScope}</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.xmlgraphics</groupId>
      <artifactId>batik-transcoder</artifactId>
      <scope>${onmsLibScope}</scope>
      <exclusions>
        <exclusion>
          <groupId>commons-logging</groupId>
          <artifactId>commons-logging</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apache.xmlgraphics</groupId>
      <artifactId>batik-xml</artifactId>
      <scope>${onmsLibScope}</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.xmlgraphics</groupId>
      <artifactId>batik-util</artifactId>
      <scope>${onmsLibScope}</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.taglibs</groupId>
      <artifactId>taglibs-standard-impl</artifactId>
      <scope>${onmsLibScope}</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <scope>${onmsLibScope}</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>jcl-over-slf4j</artifactId>
      <scope>${onmsLibScope}</scope>
    </dependency>
    <dependency>
      <groupId>org.tuckey</groupId>
      <artifactId>urlrewritefilter</artifactId>
    </dependency>
    <dependency>
      <groupId>oro</groupId>
      <artifactId>oro</artifactId>
      <scope>${onmsLibScope}</scope>
    </dependency>

    <!-- indirect 3rd-party dependencies that belong in WEB-INF/lib -->
    <!-- these should all be <scope>compile</scope> -->

    <dependency>
      <groupId>poi</groupId>
      <artifactId>poi</artifactId>
    </dependency>
    <dependency>
      <groupId>rome</groupId>
      <artifactId>rome</artifactId>
      <exclusions>
        <exclusion>
          <groupId>jdom</groupId>
          <artifactId>jdom</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <!-- Use an OSGi-compatible jdom bundle -->
    <dependency>
      <groupId>org.apache.servicemix.bundles</groupId>
      <artifactId>org.apache.servicemix.bundles.jdom</artifactId>
      <version>1.1_4</version>
    </dependency>
    <dependency>
      <groupId>org.extremecomponents</groupId>
      <artifactId>extremecomponents</artifactId>
      <exclusions>
        <exclusion>
          <groupId>commons-logging</groupId>
          <artifactId>commons-logging</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <!--

      JMesa is the latest version of the extremecomponents library. We
      should eventually migrate our code to use it.

    <dependency>
      <groupId>org.jmesa</groupId>
      <artifactId>jmesa</artifactId>
    </dependency>
    -->
    <dependency>
        <groupId>net.sf.jung</groupId>
        <artifactId>jung-api</artifactId>
    </dependency>
    <dependency>
        <groupId>net.sf.jung</groupId>
        <artifactId>jung-graph-impl</artifactId>
    </dependency>
    <dependency>
        <groupId>net.sf.jung</groupId>
        <artifactId>jung-algorithms</artifactId>
    </dependency>
    <dependency>
        <groupId>net.sf.jung</groupId>
        <artifactId>jung-visualization</artifactId>
    </dependency>
    <dependency>
      <groupId>org.freemarker</groupId>
      <artifactId>freemarker</artifactId>
      <version>${freemarkerVersion}</version>
    </dependency>

    <!-- test dependencies -->
    <dependency>
      <groupId>org.opennms</groupId>
      <artifactId>opennms-dao-mock</artifactId>
      <scope>test</scope>
    </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-icmp-jna</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.opennms.core.test-api</groupId>
      <artifactId>org.opennms.core.test-api.db</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.opennms.core.test-api</groupId>
      <artifactId>org.opennms.core.test-api.http</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.opennms.core.test-api</groupId>
      <artifactId>org.opennms.core.test-api.rest</artifactId>
    </dependency>
    <dependency>
      <groupId>org.opennms.core.test-api</groupId>
      <artifactId>org.opennms.core.test-api.snmp</artifactId>
    </dependency>
    <dependency>
      <groupId>org.opennms.core.test-api</groupId>
      <artifactId>org.opennms.core.test-api.xml</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.opennms.core.test-api</groupId>
      <artifactId>org.opennms.core.test-api.services</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.opennms.tests</groupId>
      <artifactId>org.opennms.tests.mock-elements</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.opennms.features.events</groupId>
      <artifactId>org.opennms.features.events.daemon</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.opennms.features.collection</groupId>
      <artifactId>org.opennms.features.collection.persistence.rrd</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.easymock</groupId>
      <artifactId>easymock</artifactId>
      <scope>test</scope>
    </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>org.mockito</groupId>
      <artifactId>mockito-all</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <pluginRepositories>
    <pluginRepository>
      <snapshots><enabled>false</enabled></snapshots>
      <releases><enabled>true</enabled></releases>
      <id>opennms-repo</id>
      <name>OpenNMS Repository</name>
      <url>http://maven.opennms.org/content/groups/opennms.org-release</url>
    </pluginRepository>
  </pluginRepositories>


  <repositories>
    <repository>
      <snapshots><enabled>false</enabled></snapshots>
      <releases><enabled>true</enabled></releases>
      <id>opennms-repo</id>
      <name>OpenNMS Repository</name>
      <url>http://maven.opennms.org/content/groups/opennms.org-release</url>
    </repository>
  </repositories>

</project>
