<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>

  <packaging>jar</packaging>
  
  <parent>
    <groupId>org.cache2k</groupId>
    <artifactId>cache2k-parent</artifactId>
    <version>1.0.2.Final</version>
    <relativePath>../pom.xml</relativePath>
  </parent>

  <description>
  </description>

  <artifactId>test-osgi</artifactId>
  <version>1.0.2.Final</version>
  <name>cache2k tests for OSGi</name>

  <!-- https://ops4j1.jira.com/wiki/display/paxexam/Pax+Exam+Maven+Dependencies
   -->
  <properties>
    <exam.version>4.8.0</exam.version>
    <url.version>1.6.0</url.version>
    <felix.version>5.4.0</felix.version>
    <slf4j.version>1.7.13</slf4j.version>
  </properties>

  <dependencies>

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

    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>cache2k-api</artifactId>
      <version>${project.version}</version>
      <scope>compile</scope>
    </dependency>

    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>cache2k-all</artifactId>
      <version>${project.version}</version>
      <scope>runtime</scope>
    </dependency>

    <dependency>
      <groupId>org.ops4j.pax.exam</groupId>
      <artifactId>pax-exam-container-native</artifactId>
      <version>${exam.version}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.ops4j.pax.exam</groupId>
      <artifactId>pax-exam-junit4</artifactId>
      <version>${exam.version}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.ops4j.pax.exam</groupId>
      <artifactId>pax-exam-link-mvn</artifactId>
      <version>${exam.version}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.ops4j.pax.url</groupId>
      <artifactId>pax-url-aether</artifactId>
      <version>${url.version}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.felix</groupId>
      <artifactId>org.apache.felix.framework</artifactId>
      <version>${felix.version}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-simple</artifactId>
      <version>1.5.11</version>
    </dependency>

  </dependencies>

   <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-failsafe-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>integration-test</goal>
              <goal>verify</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <systemPropertyVariables>
            <cache2k.version>${project.version}</cache2k.version>
            <slf4j.version>${slf4j.version}</slf4j.version>
          </systemPropertyVariables>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-deploy-plugin</artifactId>
        <configuration>
          <skip>true</skip>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <profiles>

    <!-- Tests don't run on Java 6 -->
    <profile>
      <id>skip-for-java6</id>
      <!-- activation via jdk is not working since we run maven with the latest JDK but switch
           to another for testing via -Djvm -->
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-failsafe-plugin</artifactId>
            <configuration>
              <skip>true</skip>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>
