<?xml version="1.0" encoding="UTF-8"?>
<project
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://maven.apache.org/POM/4.0.0"
    xsi:schemaLocation="
        http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd
">

  <parent>
    <groupId>org.opennms.netmgt.sample</groupId>
    <artifactId>sample-parent</artifactId>
    <version>15.0.0-PJSM-SNAPSHOT</version>
  </parent>

  <modelVersion>4.0.0</modelVersion>
  <artifactId>sampler-repo</artifactId>

  <name>Sample Collection and Storage :: Maven Repository</name>

  <packaging>pom</packaging>
  
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.karaf.tooling</groupId>
        <artifactId>karaf-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>features.xml</id>
            <phase>none</phase>
          </execution>
          <execution>
            <id>features-add-to-repository</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>features-add-to-repository</goal>
            </goals>
            <configuration>
              <descriptors>
                <descriptor>mvn:org.opennms.netmgt.sample/karaf/${project.version}/xml</descriptor>
              </descriptors>
              <!--
                To ensure that all JAR files for a feature are included in the repository tar.gz file,
                add the feature to this list.
              -->
              <features>
                <!-- ActiveMQ broker implementation -->
                <feature>opennms-activemq-wrapper</feature>
                <feature>activemq</feature>

                <!-- Sampler features -->
                <feature>sample-receiver-activemq</feature>
                <feature>sample-storage-file</feature>
                <feature>sample-storage-rrd</feature>
                <feature>sample-storage-newts</feature>
                <feature>newts-cassandra</feature>
                <feature>minion-base</feature>
                <feature>dominion-controller-statuswriter-dao</feature>
                <feature>dominion-controller-statuswriter-logging</feature>
                <feature>minion-controller</feature>
                <feature>dominion-controller</feature>
                <feature>sampler-with-activemq-export</feature>
                <feature>sampler-with-file-storage</feature>
                <feature>sampler-with-rrd-storage</feature>

                <!-- Newts storage -->
                <feature>newts-cassandra</feature>

                <!-- Minion management features -->
                <feature>minion-controller</feature>
                <feature>dominion-controller</feature>
                </features>
              <repository>target/maven-repo</repository>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <configuration>
          <descriptors>
            <descriptor>src/assembly/repo.xml</descriptor>
          </descriptors>
        </configuration>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <dependencies>
    <dependency>
      <groupId>org.opennms.netmgt.sample</groupId>
      <artifactId>karaf</artifactId>
      <version>${project.version}</version>
      <type>xml</type>
    </dependency>
    <dependency>
      <groupId>org.apache.karaf.assemblies.features</groupId>
      <artifactId>enterprise</artifactId>
      <version>${karafVersion}</version>
      <type>xml</type>
      <classifier>features</classifier>
    </dependency>
    <dependency>
      <groupId>org.opennms.netmgt.sample</groupId>
      <artifactId>sampler-config</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.opennms.netmgt.sample</groupId>
      <artifactId>sampler-config-snmp</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.opennms.netmgt.sample</groupId>
      <artifactId>sampler-scheduler</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.opennms.netmgt.sample</groupId>
      <artifactId>sampler-snmp</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.opennms.netmgt.sample</groupId>
      <artifactId>sampler-routes</artifactId>
      <version>${project.version}</version>
      <type>xml</type>
      <classifier>blueprint-file-storage</classifier>
    </dependency>
    <dependency>
      <groupId>org.opennms.netmgt.sample</groupId>
      <artifactId>sampler-routes</artifactId>
      <version>${project.version}</version>
      <type>xml</type>
      <classifier>blueprint-activemq-dispatch</classifier>
    </dependency>
    <dependency>
      <groupId>org.opennms.netmgt.sample</groupId>
      <artifactId>sampler-routes</artifactId>
      <version>${project.version}</version>
      <type>xml</type>
      <classifier>blueprint-activemq-receiver</classifier>
    </dependency>
    <dependency>
      <groupId>org.opennms.features.activemq</groupId>
      <artifactId>org.opennms.features.activemq.broker</artifactId>
      <version>${project.version}</version>
      <type>xml</type>
      <classifier>activemq-dispatcher</classifier>
    </dependency>
    <dependency>
      <groupId>org.opennms.features.activemq</groupId>
      <artifactId>org.opennms.features.activemq.broker</artifactId>
      <version>${project.version}</version>
      <type>xml</type>
      <classifier>activemq-receiver</classifier>
    </dependency>
    <dependency>
        <groupId>org.apache.activemq</groupId>
        <artifactId>activemq-all</artifactId>
      <version>${activemqVersion}</version>
    </dependency>
  </dependencies>

  <repositories>
    <repository>
      <id>com.springsource.repository.bundles</id>
      <name>SpringSource Enterprise Bundle Repository</name>
      <url>http://maven.opennms.org/content/groups/springsource.com-release</url>
    </repository>
    <repository>
      <id>sonatype-public-repo</id>
      <name>Sonatype Public Maven Repository</name>
      <url>http://maven.opennms.org/content/groups/sonatype.org-release</url>
    </repository>
  </repositories>

  <pluginRepositories>
    <pluginRepository>
      <snapshots><enabled>true</enabled></snapshots>
      <releases><enabled>false</enabled></releases>
      <id>opennms-snapshots</id>
      <name>OpenNMS Snapshot Maven Repository</name>
      <url>http://maven.opennms.org/content/groups/opennms.org-snapshot</url>
    </pluginRepository>
    <pluginRepository>
      <id>apache-snapshots</id>
      <name>Apache Snapshots Repository</name>
      <url>http://repository.apache.org/content/groups/snapshots-group</url>
      <releases><enabled>false</enabled></releases>
      <snapshots><enabled>true</enabled></snapshots>
    </pluginRepository>
  </pluginRepositories>

</project>
