<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.kie.remote</groupId>
    <artifactId>kie-remote</artifactId>
    <version>6.2.0.CR3</version>
  </parent>

  <artifactId>kie-remote-client</artifactId>
  <name>KIE Remote Services :: Client</name>

  <dependencies>
    <dependency>
      <groupId>org.codehaus.jackson</groupId>
      <artifactId>jackson-core-asl</artifactId>
    </dependency>

    <dependency>
      <groupId>org.hornetq</groupId>
      <artifactId>hornetq-core-client</artifactId>
    </dependency>

    <dependency>
      <groupId>org.kie.remote</groupId>
      <artifactId>kie-remote-jaxb</artifactId>
    </dependency>
    <dependency>
      <groupId>org.kie.remote</groupId>
      <artifactId>kie-remote-common</artifactId>
    </dependency>
    <dependency>
      <groupId>org.kie</groupId>
      <artifactId>kie-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.kie</groupId>
      <artifactId>kie-internal</artifactId>
    </dependency>

    <!-- REST -->
    <dependency>
      <groupId>org.jboss.resteasy</groupId>
      <artifactId>jaxrs-api</artifactId>
    </dependency>
   <dependency>
      <groupId>org.jsoup</groupId>
      <artifactId>jsoup</artifactId>
    </dependency>
    
    <!-- JMS -->
    <dependency>
      <groupId>org.jboss.spec.javax.jms</groupId>
      <artifactId>jboss-jms-api_1.1_spec</artifactId>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.hornetq</groupId>
      <artifactId>hornetq-jms-client</artifactId>
    </dependency>

    <!-- REST:       covered via java classes: see KieRemoteHttpRequest  -->
    <!-- jaxb/json:  covered via imports from kie-remote-jaxb -->
    
    <!-- logging -->
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>

    <!-- TEST -->
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.jbpm</groupId>
      <artifactId>jbpm-test</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jbpm</groupId>
      <artifactId>jbpm-bpmn2</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jbpm</groupId>
      <artifactId>jbpm-bpmn2</artifactId>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jbpm</groupId>
      <artifactId>jbpm-persistence-jpa</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jbpm</groupId>
      <artifactId>jbpm-kie-services</artifactId>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>kie-ci</artifactId>
          <groupId>org.kie</groupId>
        </exclusion>
      </exclusions>
    </dependency>

    <!-- serialization -->
    <dependency>
      <groupId>org.yaml</groupId>
      <artifactId>snakeyaml</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jbpm</groupId>
      <artifactId>jbpm-human-task-core</artifactId>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.kie.remote</groupId>
      <artifactId>kie-remote-jaxb</artifactId>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>

    <!-- reflection -->
    <dependency>
      <groupId>org.reflections</groupId>
      <artifactId>reflections</artifactId>
      <scope>test</scope>
    </dependency>

    <!-- powermock -->
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-all</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.powermock</groupId>
      <artifactId>powermock-module-junit4</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.powermock</groupId>
      <artifactId>powermock-api-mockito</artifactId>
      <scope>test</scope>
    </dependency>
    
  
    <!-- for the live server test -->
    <dependency>
      <groupId>org.jboss</groupId>
      <artifactId>jboss-remote-naming</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jboss.xnio</groupId>
      <artifactId>xnio-nio</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-clean-plugin</artifactId>
        <configuration>
          <filesets>
            <fileset>
              <directory>${basedir}/src/main/unpacked/org</directory>
            </fileset>
          </filesets>
        </configuration>
      </plugin>
      
      <!-- 0. add src/main/unpacked so that unpacked classes are added to jar -->
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>add-unpacked-sources</id>
            <phase>initialize</phase>
            <goals>
              <goal>add-source</goal>
            </goals>
            <configuration>
              <sources>
                <source>src/main/unpacked</source>
              </sources>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <!-- 1. unpack flat command class sourc from kie-remote-jaxb-gen -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>unpack-cmd-sources</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>unpack</goal>
            </goals>
            <configuration>
              <artifactItems>
                <artifactItem>
                  <groupId>org.kie.remote</groupId>
                  <artifactId>kie-remote-jaxb-gen</artifactId>
                  <classifier>sources</classifier>
                  <type>jar</type>
                  <overWrite>true</overWrite>
                  <outputDirectory>${basedir}/src/main/unpacked</outputDirectory>
                  <includes>**/*.java</includes>
                </artifactItem>
              </artifactItems>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>

