<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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>
    <groupId>org.drools</groupId>
    <artifactId>droolsjbpm-osgi-examples</artifactId>
    <version>6.2.0.Final</version>
  </parent>

  <artifactId>spring-camel-drools-decision-table-example</artifactId>
  <packaging>bundle</packaging>

  <name>Drools &amp; Decision Table :: OSGi Kie Spring Camel Example</name>

  <dependencies>

    <dependency>
      <groupId>org.kie</groupId>
      <artifactId>kie-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.kie</groupId>
      <artifactId>kie-internal</artifactId>
    </dependency>
    <dependency>
      <groupId>org.drools</groupId>
      <artifactId>drools-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.drools</groupId>
      <artifactId>drools-compiler</artifactId>
    </dependency>
    <dependency>
      <groupId>org.drools</groupId>
      <artifactId>drools-decisiontables</artifactId>
    </dependency>
    <dependency>
      <groupId>org.kie</groupId>
      <artifactId>kie-spring</artifactId>
    </dependency>
    <dependency>
      <groupId>org.kie</groupId>
      <artifactId>kie-camel</artifactId>
    </dependency>
    <dependency>
      <groupId>org.drools</groupId>
      <artifactId>drools-osgi-integration</artifactId>
    </dependency>

    <!-- POI - Excell -->
    <dependency>
      <groupId>org.apache.poi</groupId>
      <artifactId>poi-ooxml</artifactId>
    </dependency>

    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-beans</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-context</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-web</artifactId>
    </dependency>

    <dependency>
      <groupId>org.apache.camel</groupId>
      <artifactId>camel-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.camel</groupId>
      <artifactId>camel-spring</artifactId>
    </dependency>

    <!-- Logging -->
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>
    <dependency><!-- For unit test logging: configure in src/test/resources/logback-test.xml -->
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
    </dependency>

    <!-- testing -->
    <dependency>
      <groupId>org.apache.camel</groupId>
      <artifactId>camel-test-spring</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.camel</groupId>
      <artifactId>camel-test</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-test</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <testResources>
      <testResource>
        <filtering>false</filtering>
        <directory>src/test/resources</directory>
      </testResource>
      <testResource>
        <filtering>true</filtering>
        <directory>src/test/filtered-resources</directory>
      </testResource>
    </testResources>

    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>1.6</source>
          <target>1.6</target>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <extensions>true</extensions>
        <configuration>
          <instructions>
            <Import-Package>
              !org.drools.camel.example,
              org.apache.camel;version="[2.10,3)",
              org.apache.camel.spi;version="[2.10,3)",
              org.apache.camel.model;version="[2.10,3)",
              org.drools.core;version="[6.0,7)",
              org.drools.core.base;version="[6.0,7)",
              org.drools.core.base.accumulators;version="[6.0,7)",
              org.drools.core.base.evaluators;version="[6.0,7)",
              org.drools.core.base.extractors;version="[6.0,7)",
              org.drools.core.command.runtime;version="[6.0,7)",
              org.drools.core.command.runtime.rule;version="[6.0,7)",
              org.drools.core.conflict;version="[6.0,7)",
              org.drools.core.reteoo;version="[6.0,7)",
              org.drools.core.rule.builder.dialect.asm;version="[6.0,7)",
              org.drools.core.spi;version="[6.0,7)",
              org.drools.compiler.compiler;version="[6.0,7)",
              org.drools.compiler.rule.builder.dialect.mvel;version="[6.0,7)",
              org.jbpm.process.instance.impl;version="[6.0,7)",
              org.jbpm.process.instance.event;version="[6.0,7)",
              org.jbpm.bpmn2;version="[6.0,7)",
              org.kie.api;version="[6.0,7)",
              org.kie.api.definition.rule;version="[6.0,7)",
              org.kie.api.runtime.rule;version="[6.0,7)",
              org.kie.internal;version="[6.0,7)",
              org.kie.spring;version="[6.0,7)",
              org.kie.camel.component;version="[6.0,7)",
              org.eclipse.jdt.internal.compiler,
              org.drools.osgi.spring,
              org.drools.osgi.compiler
            </Import-Package>
            <Private-Package>
              org.drools.camel.example
            </Private-Package>
          </instructions>
        </configuration>
      </plugin>

      <!-- allows the route to be ran via 'mvn camel:run' -->
      <plugin>
        <groupId>org.apache.camel</groupId>
        <artifactId>camel-maven-plugin</artifactId>
        <configuration>
          <applicationContextUri>META-INF/spring/*.xml</applicationContextUri>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <excludes>
            <exclude>**/Guvnor**.java</exclude>
          </excludes>
        </configuration>
      </plugin>

      <!-- WAR -->
      <plugin>
        <groupId>org.mortbay.jetty</groupId>
        <artifactId>jetty-maven-plugin</artifactId>
        <version>8.1.9.v20130131</version>
        <configuration>
          <webAppConfig>
            <contextPath>/</contextPath>
          </webAppConfig>
          <systemProperties>
            <!-- enable easy JMX connection to JConsole -->
            <systemProperty>
              <name>com.sun.management.jmxremote</name>
              <value/>
            </systemProperty>
          </systemProperties>
          <scanIntervalSeconds>10</scanIntervalSeconds>
        </configuration>
      </plugin>

    </plugins>
  </build>

  <profiles>
    <profile>
      <id>simple</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-maven-plugin</artifactId>
            <configuration>
              <applicationContextUri>META-INF/spring/camel-context.xml</applicationContextUri>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>decision-table</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-maven-plugin</artifactId>
            <configuration>
              <applicationContextUri>META-INF/spring/camel-context-decision-table.xml</applicationContextUri>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>


</project>
