<?xml version='1.0' encoding='UTF-8'?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <modelVersion>4.0.0</modelVersion>
   <parent>
      <groupId>org.infinispan</groupId>
      <artifactId>infinispan-jcache-parent</artifactId>
      <version>7.2.2.Final</version>
      <relativePath>../pom.xml</relativePath>
   </parent>

   <artifactId>infinispan-jcache</artifactId>
   <packaging>bundle</packaging>
   <name>Infinispan JCACHE (JSR-107) Embedded Implementation</name>
   <description>JCACHE (JSR-107) implementation using Infinispan embedded mode</description>

   
   <properties>
      <module.skipComponentMetaDataProcessing>false</module.skipComponentMetaDataProcessing>
   </properties>

   <dependencies>
      <dependency>
         <groupId>${project.groupId}</groupId>
         <artifactId>infinispan-core</artifactId>
      </dependency>

      <dependency>
         <groupId>${project.groupId}</groupId>
         <artifactId>infinispan-jcache-commons</artifactId>
      </dependency>

      <dependency>
         <groupId>javax.cache</groupId>
         <artifactId>cache-api</artifactId>
      </dependency>

      <dependency>
         <groupId>${project.groupId}</groupId>
         <artifactId>infinispan-core</artifactId>
         <type>test-jar</type>
         <scope>test</scope>
      </dependency>

      <dependency>
         <groupId>org.jboss.arquillian.testng</groupId>
         <artifactId>arquillian-testng-container</artifactId>
         <scope>test</scope>
      </dependency>

      <dependency>
         <groupId>org.kohsuke.metainf-services</groupId>
         <artifactId>metainf-services</artifactId>
         <optional>true</optional>
      </dependency>

   </dependencies>

   <repositories>
      <repository>
         <releases>
            <enabled>true</enabled>
         </releases>
         <snapshots>
            <enabled>true</enabled>
         </snapshots>
         <id>sonatype-snapshot-repository</id>
         <name>Sonatype snapshot to be removed once everything becomes stable
         </name>
         <url>https://oss.sonatype.org/content/repositories/snapshots</url>
      </repository>
   </repositories>

   <build>
      <resources>
         <resource>
            <directory>${basedir}/src/main/resources</directory>
         </resource>
      </resources>
      <plugins>
         <plugin>
            <groupId>org.apache.felix</groupId>
            <artifactId>maven-bundle-plugin</artifactId>
            <configuration>
               <instructions>
                  <Export-Package>
                     ${project.groupId}.jcache.embedded.*;version=${project.version};-split-package:=error
                  </Export-Package>
                  <Include-Resource>
                     {maven-resources},
                     /META-INF/services=${project.basedir}/target/classes/META-INF/services,
                     /OSGI-INF/blueprint/blueprint.xml=${project.basedir}/target/classes/OSGI-INF/blueprint/blueprint.xml
                  </Include-Resource>
               </instructions>
            </configuration>
         </plugin>

         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
               <parallel>none</parallel>
               <groups>${defaultTestGroup}</groups>
            </configuration>
         </plugin>

         <plugin>
            <groupId>org.scala-tools</groupId>
            <artifactId>maven-scala-plugin</artifactId>
            <executions>
               <execution>
                  <id>generate-blueprint</id>
                  <phase>prepare-package</phase>
               </execution>
            </executions>
         </plugin>
         
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-invoker-plugin</artifactId>
            <version>${version.maven.invoker}</version>
            <configuration>
               <addTestClassPath>true</addTestClassPath>
               <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
               <pomIncludes>
                  <pomInclude>*/pom.xml</pomInclude>
               </pomIncludes>
               <postBuildHookScript>verify</postBuildHookScript>
               <streamLogs>true</streamLogs>
               <goals>
                  <goal>clean</goal>
                  <goal>package</goal>
               </goals>
               <properties>
                  <maven.test.skip.exec>${maven.test.skip.exec}</maven.test.skip.exec>
                  <skipTests>${skipTests}</skipTests>
                  <log4j.configuration>${log4j.configuration}</log4j.configuration>
               </properties>
            </configuration>
            <executions>
               <execution>
                  <id>integration-test</id>
                  <goals>
                     <goal>install</goal>
                     <goal>run</goal>
                  </goals>
               </execution>
            </executions>
         </plugin>

      </plugins>
   </build>

   <profiles>
      <profile>
         <id>default</id>
         <activation>
            <activeByDefault>true</activeByDefault>
         </activation>
         <dependencies>
            <dependency>
               <groupId>org.jboss.arquillian.container</groupId>
               <artifactId>arquillian-weld-ee-embedded-1.1</artifactId>
               <scope>test</scope>
            </dependency>
            <dependency>
               <groupId>org.jboss.weld</groupId>
               <artifactId>weld-core</artifactId>
               <scope>test</scope>
            </dependency>
            <dependency>
               <groupId>org.jboss.spec</groupId>
               <artifactId>jboss-javaee-7.0</artifactId>
               <type>pom</type>
               <scope>test</scope>
            </dependency>
            <dependency>
               <groupId>org.jboss.logmanager</groupId>
               <artifactId>jboss-logmanager</artifactId>
               <scope>test</scope>
            </dependency>
            <dependency>
               <groupId>org.slf4j</groupId>
               <artifactId>slf4j-jdk14</artifactId>
               <scope>test</scope>
            </dependency>
         </dependencies>
         <build>
            <plugins>
               <plugin>
                  <groupId>org.scala-tools</groupId>
                  <artifactId>maven-scala-plugin</artifactId>
                  <executions>
                     <execution>
                        <id>default</id>
                        <phase>none</phase>
                     </execution>
                     <execution>
                        <id>compile</id>
                        <phase>none</phase>
                     </execution>
                     <execution>
                        <id>test-compile</id>
                        <phase>none</phase>
                     </execution>
                  </executions>
               </plugin>
            </plugins>
         </build>
      </profile>
      <profile>
         <id>smoke</id>
         <build>
            <plugins>
               <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-invoker-plugin</artifactId>
                  <version>${version.maven.invoker}</version>
                  <executions>
                     <execution>
                        <id>integration-test</id>
                        <phase>none</phase>
                     </execution>
                  </executions>
               </plugin>
            </plugins>
         </build>
      </profile>
   </profiles>

</project>