<?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/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>org.opennms.plugins</groupId>
    <artifactId>org.opennms.plugin.pluginmanager.parent</artifactId>
    <version>1.3.0-SNAPSHOT</version>
  </parent>

  <artifactId>org.opennms.plugin.pluginmanager.karaf-pluginmanager</artifactId>
  <packaging>bundle</packaging>
  <name>org.opennms.plugin.pluginmanager.karaf-pluginmanager</name>
  <description>Feature for running the OSGi plugin manager in a standalone karaf instance.</description>

  <properties>
    <bundle.symbolicName>org.opennms.plugin.pluginmanager.karaf-pluginmanager</bundle.symbolicName>
    <bundle.namespace>UNDEFINED</bundle.namespace>
    <productName>org.opennms.plugin.pluginmanager.karaf-pluginmanager</productName>
  </properties>

  <build>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
      </resource>
      <resource>
        <directory>${project.build.directory}/imported-resources</directory>
      </resource>
      <resource>
        <directory>${project.build.directory}/filtered-resources</directory>
      </resource>
    </resources>
    <plugins>

      <!-- We copy the diagnostics resources directly into this bundle since -->
      <!-- pax-web DefaultResources cannot expose resources on the class path -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>unpack</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>unpack</goal>
            </goals>
            <configuration>
              <artifactItems>
                <artifactItem>
                  <groupId>org.opennms.plugins</groupId>
                  <artifactId>org.opennms.plugin.pluginmanager.pluginmanager-core</artifactId>
                  <version>${project.version}</version>
                  <type>jar</type>
                  <overWrite>true</overWrite>
                  <includes>diagnostics/*</includes>
                  <outputDirectory>${project.build.directory}/imported-resources</outputDirectory>
                </artifactItem>
              </artifactItems>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <!-- copy and process the product descriptor for this project -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <executions>
          <execution>
            <id>filter-resources</id>
            <phase>process-resources</phase>
            <goals>
              <goal>copy-resources</goal>
            </goals>
            <configuration>
              <outputDirectory>${project.build.directory}/filtered-resources</outputDirectory>
              <resources>
                <resource>
                  <directory>src/main/filtered-resources</directory>
                  <filtering>true</filtering>
                </resource>
              </resources>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <dependencies>


    <!-- Jersey Dependencies -->
    <dependency>
      <groupId>com.sun.jersey</groupId>
      <artifactId>jersey-server</artifactId>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.sun.jersey</groupId>
      <artifactId>jersey-servlet</artifactId>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.sun.jersey</groupId>
      <artifactId>jersey-core</artifactId>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.sun.jersey</groupId>
      <artifactId>jersey-client</artifactId>
      <scope>compile</scope>
    </dependency>

    <dependency>
      <groupId>javax.ws.rs</groupId>
      <artifactId>jsr311-api</artifactId>
      <scope>provided</scope>
    </dependency>

    <!-- vaadin dependencies -->
    <dependency>
      <groupId>com.vaadin</groupId>
      <artifactId>vaadin-compatibility-server</artifactId>
      <!-- <scope>provided</scope> -->
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.vaadin</groupId>
      <artifactId>vaadin-compatibility-client-compiled</artifactId>
      <!-- <scope>provided</scope> -->
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.vaadin</groupId>
      <artifactId>vaadin-compatibility-client</artifactId>
      <!-- <scope>provided</scope> -->
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.vaadin</groupId>
      <artifactId>vaadin-compatibility-themes</artifactId>
      <!-- <scope>provided</scope> -->
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.vaadin</groupId>
      <artifactId>vaadin-compatibility-shared</artifactId>
      <!-- <scope>provided</scope> -->
      <scope>compile</scope>
    </dependency>

    <dependency>
      <groupId>org.jsoup</groupId>
      <artifactId>jsoup</artifactId>
      <!-- <scope>provided</scope> -->
      <scope>compile</scope>
    </dependency>

    <dependency>
      <groupId>com.vaadin.external.json</groupId>
      <artifactId>json</artifactId>
      <!-- <scope>provided</scope> -->
      <scope>compile</scope>
    </dependency>

    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
      <!-- <scope>provided</scope> -->
      <scope>compile</scope>
    </dependency>
    <!-- servelet dependencies -->
    <!-- <dependency> -->
    <!-- <groupId>org.eclipse.jetty.orbit</groupId> -->
    <!-- <artifactId>javax.servlet</artifactId> -->
    <!-- <scope>compile</scope> -->
    <!-- </dependency> -->
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>javax.servlet-api</artifactId>
      <version>${servletApiVersion}</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.opennms.vaadin-extender</groupId>
      <artifactId>service</artifactId>
      <!-- <scope>provided</scope> -->
      <scope>compile</scope>
    </dependency>

    <!-- OSGi / Karaf dependencies -->
    <dependency>
      <groupId>org.apache.karaf.shell</groupId>
      <artifactId>org.apache.karaf.shell.console</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.osgi</groupId>
      <artifactId>org.osgi.core</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.osgi</groupId>
      <artifactId>org.osgi.compendium</artifactId>
      <scope>provided</scope>
    </dependency>

    <!-- licence / feature / plugin manager dependencies -->
    <dependency>
      <groupId>org.opennms.plugins</groupId>
      <artifactId>org.opennms.plugin.licencemanager</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.opennms.plugins</groupId>
      <artifactId>org.opennms.plugin.featuremanager</artifactId>
      <scope>provided</scope>
    </dependency>

    <!-- plugin-manager core dependencies -->
    <dependency>
      <groupId>org.opennms.plugins</groupId>
      <artifactId>org.opennms.plugin.pluginmanager.pluginmanager-core</artifactId>
      <version>${project.version}</version>
      <scope>provided</scope>
    </dependency>

    <!--test dependencies -->
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>

  </dependencies>

</project>
