<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.camunda.bpm.extension.osgi</groupId>
    <artifactId>camunda-bpm-osgi-root</artifactId>
    <version>2.0.0</version>
  </parent>

  <name>Camunda BPM - Engine - OSGi</name>
  <artifactId>camunda-bpm-osgi</artifactId>
  <packaging>bundle</packaging>

  <properties>
    <camunda.osgi.activator>
      org.camunda.bpm.extension.osgi.Activator
    </camunda.osgi.activator>
    <camunda.osgi.import.pkg>
      org.camunda.bpm.engine.*;${camunda.osgi.import.camunda.engine.version},
      org.osgi.service.cm*;resolution:=optional,
      *
    </camunda.osgi.import.pkg>
    <camunda.artifact>
      org.camunda.bpm.extension.osgi
    </camunda.artifact>
    <camunda.osgi.symbolic.name>${camunda.artifact}</camunda.osgi.symbolic.name>
    <camunda.osgi.export.pkg>
      ${camunda.artifact}.classloading,
      ${camunda.artifact}.el,
      ${camunda.artifact}.engine,
      ${camunda.artifact}.util,
    </camunda.osgi.export.pkg>
    <camunda.osgi.dynamic.import />
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.camunda.bpm</groupId>
      <artifactId>camunda-engine</artifactId>
    </dependency>
    <dependency>
      <groupId>org.osgi</groupId>
      <artifactId>org.osgi.core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.osgi</groupId>
      <artifactId>org.osgi.compendium</artifactId>
    </dependency>
	<dependency>
		<groupId>org.apache.felix</groupId>
		<artifactId>org.apache.felix.dependencymanager</artifactId>
	</dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.h2database</groupId>
      <artifactId>h2</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest-all</artifactId>
      <version>1.3</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <scope>test</scope>
      <version>${mockito.version}</version>
    </dependency>
    <dependency>
      <groupId>commons-beanutils</groupId>
      <artifactId>commons-beanutils</artifactId>
      <version>1.9.1</version>
      <optional>true</optional>
    </dependency>
  </dependencies>

  <build>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
        <includes>
          <include>**/*.*</include>
        </includes>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>distro</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-sources</id>
                <phase>package</phase>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>
