<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.cache2k</groupId>
    <artifactId>cache2k-parent</artifactId>
    <version>1.2.0.Final</version>
    <relativePath>../pom.xml</relativePath>
  </parent>

  <artifactId>cache2k-api</artifactId>
  <version>1.2.0.Final</version>
  <name>cache2k API</name>

  <description>
    A light weight and high performance Java caching library. Android and Java 6 compatible.
    This artifact contains the official API of cache2k. It is intended to be stable and
    well documented.
  </description>

  <dependencies>

    <!--
         Optional. For the extended JCache configuration
    -->
    <dependency>
      <groupId>javax.cache</groupId>
      <artifactId>cache-api</artifactId>
      <version>${jcache.version}</version>
      <optional>true</optional>
    </dependency>

    <dependency>
      <groupId>org.cache2k</groupId>
      <artifactId>cache2k-testing</artifactId>
      <version>${project.version}</version>
      <scope>test</scope>
    </dependency>

  </dependencies>

  <build>
    <plugins>

      <!-- print a clirr report with:  mvn clirr:check -->
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>clirr-maven-plugin</artifactId>
        <version>2.6.1</version>
        <configuration>
          <comparisonArtifacts>
            <comparisonArtifact>
              <groupId>org.cache2k</groupId>
              <artifactId>cache2k-api</artifactId>
              <version>1.0.0.Final</version>
            </comparisonArtifact>
          </comparisonArtifacts>
        </configuration>
      </plugin>

      <!-- add OSGi bundle information. does not work yet.
           https://github.com/cache2k/cache2k/issues/83
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <executions>
          <execution>
            <id>bundle-manifest</id>
            <phase>process-classes</phase>
            <goals>
              <goal>manifest</goal>
            </goals>
          </execution>
        </executions>
        <extensions>true</extensions>
        <configuration>
          <instructions>
            <Export-Package>
              org.cache2k,
              org.cache2k.spi,
              org.cache2k.integration,
              org.cache2k.expiry,
              org.cache2k.event,
              org.cache2k.processor,
              org.cache2k.configuration
            </Export-Package>
            <Import-Package>
              javax.cache.configuration;resolution:=optional
            </Import-Package>
            <Bundle-DocURL>https://cache2k.org</Bundle-DocURL>
            <Implementation-Build>${buildNumber}</Implementation-Build>
            <Implementation-Version>${project.version}</Implementation-Version>
            <Implementation-Title>${project.name}</Implementation-Title>
            <Implementation-Vendor-Id>${project.groupId}</Implementation-Vendor-Id>
            <Implementation-Vendor>${project.organization.name}</Implementation-Vendor>
            <Require-Capability>osgi.extender; filter:="(osgi.extender=osgi.serviceloader.processor)"</Require-Capability>
            <Require-Capability>osgi.serviceloader; filter:="(osgi.serviceloader=org.cache2k.spi.Cache2kCoreProvider)";cardinality:=multiple</Require-Capability>
          </instructions>
          <niceManifest>true</niceManifest>
        </configuration>
      </plugin>
      -->

    </plugins>
  </build>

</project>
