<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.jbpm</groupId>
    <artifactId>jbpm-services</artifactId>
    <version>7.0.0.Beta4</version>
  </parent>
  <artifactId>jbpm-services-api</artifactId>
  <packaging>bundle</packaging>
  <name>jBPM :: Services API</name>

  <properties>
    <osgi.Bundle-SymbolicName>org.jbpm.services.api;singleton:=true</osgi.Bundle-SymbolicName>
  </properties>

  <dependencies>
    <!-- kie -->
    <dependency>
      <groupId>org.kie</groupId>
      <artifactId>kie-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.kie</groupId>
      <artifactId>kie-internal</artifactId>
    </dependency> 
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>
  </dependencies>
  
   <build>
    <plugins>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <configuration>
          <instructions>
            <Import-Package>
              javax.transaction.*;resolution:=optional,
              *
            </Import-Package>
            <Export-Package>
              org.jbpm.services.api.*,
            </Export-Package>
          </instructions>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.revapi</groupId>
        <artifactId>revapi-maven-plugin</artifactId>
        <configuration>
          <oldArtifacts>
            <artifact>${project.groupId}:${project.artifactId}:${version.org.kie.latestFinal.release}</artifact>
          </oldArtifacts>
          <!-- By default revapi will check the oldArtifact against the currently executed build -->
          <analysisConfigurationFiles>
            <configurationFile>
              <path>src/build/revapi-config.json</path>
            </configurationFile>
          </analysisConfigurationFiles>
          <reportSeverity>nonBreaking</reportSeverity>
        </configuration>
        <!-- Running two executions is a workaround to make sure we get a HTML report in case revapi finds
             some incompatible changes. The "check" goal will simply fail the whole build before it could get
             to the report. To make sure we always get a HTML report, the "report" goal needs to be executed
             before the "check" goal.
             Once https://github.com/revapi/revapi/issues/11 is fixed it should be possible to use single execution. -->
        <executions>
          <execution>
            <id>check</id>
            <goals>
              <goal>check</goal>
            </goals>
            <phase>verify</phase>
          </execution>
          <execution>
            <!-- report can be found in ${build.directory}/site/revapi-report.html -->
            <id>report</id>
            <goals>
              <goal>report</goal>
            </goals>
            <phase>package</phase>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>