<?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-parent</artifactId>
      <version>8.2.1.Final</version>
      <relativePath>../parent/pom.xml</relativePath>
   </parent>

   <artifactId>infinispan-core</artifactId>
   <packaging>bundle</packaging>
   <name>Infinispan Core</name>
   <description>Infinispan core module</description>

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

      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-commons</artifactId>
      </dependency>

      <dependency>
         <groupId>org.jgroups</groupId>
         <artifactId>jgroups</artifactId>
      </dependency>

      
      <dependency>
         <groupId>org.jboss.spec.javax.transaction</groupId>
         <artifactId>jboss-transaction-api_1.1_spec</artifactId>
      </dependency>

      <dependency>
         <groupId>org.jboss.marshalling</groupId>
         <artifactId>jboss-marshalling-osgi</artifactId>
      </dependency>

      <dependency>
         <groupId>org.jboss.logging</groupId>
         <artifactId>jboss-logging</artifactId>
      </dependency>

      <dependency>
         <groupId>org.jboss.naming</groupId>
         <artifactId>jnp-client</artifactId>
         <scope>test</scope>
         <exclusions>
            <exclusion>
               <groupId>org.jboss.logging</groupId>
               <artifactId>jboss-logging-spi</artifactId>
            </exclusion>
         </exclusions>
      </dependency>

      <dependency>
         <groupId>org.jboss.naming</groupId>
         <artifactId>jnpserver</artifactId>
         <scope>test</scope>
         <exclusions>
            <exclusion>
               <groupId>org.jboss.logging</groupId>
               <artifactId>jboss-logging-spi</artifactId>
            </exclusion>
         </exclusions>
      </dependency>

      <dependency>
         <groupId>org.apache.commons</groupId>
         <artifactId>commons-math</artifactId>
         <scope>test</scope>
      </dependency>

      <dependency>
         <groupId>org.javassist</groupId>
         <artifactId>javassist</artifactId>
         <scope>test</scope>
      </dependency>

      <dependency>
         <groupId>org.apache.geronimo.components</groupId>
         <artifactId>geronimo-transaction</artifactId>
         <scope>test</scope>
      </dependency>
      
      <dependency>
         <groupId>org.objectweb.howl</groupId>
         <artifactId>howl</artifactId>
         <scope>test</scope>
      </dependency>

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

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

   </dependencies>

   <build>
      <resources>
         <resource>
            <directory>${project.basedir}/src/main/resources</directory>
            <filtering>true</filtering>
            <includes>
               <include>features.xml</include>
            </includes>
         </resource>
         <resource>
            <directory>${project.basedir}/src/main/resources</directory>
            <filtering>false</filtering>
            <includes>
               <include>schema/*-${infinispan.core.schema.version}.xsd</include>
            </includes>
         </resource>
         <resource>
            <directory>${project.basedir}/src/main/resources</directory>
            <filtering>false</filtering>
            <includes>
               <include>**/*</include>
            </includes>
            <excludes>
               <exclude>features.xml</exclude>
               <exclude>schema/**</exclude>
            </excludes>
         </resource>
      </resources>
      <plugins>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-antrun-plugin</artifactId>
            <executions>
               <execution>
                  <id>generate-blueprint</id>
                  <goals>
                     <goal>run</goal>
                  </goals>
                  <phase>prepare-package</phase>
               </execution>
            </executions>
         </plugin>
         <plugin>
            <groupId>org.jboss.maven.plugins</groupId>
            <artifactId>maven-injection-plugin</artifactId>
            <executions>
               <execution>
                  <phase>compile</phase>
                  <goals>
                     <goal>bytecode</goal>
                  </goals>
               </execution>
            </executions>
            <configuration>
               <bytecodeInjections>
                  <bytecodeInjection>
                     <expression>${project.version}</expression>
                     <targetMembers>
                        <methodBodyReturn>
                           <className>org.infinispan.Version$Injected</className>
                           <methodName>getVersion</methodName>
                        </methodBodyReturn>
                     </targetMembers>
                  </bytecodeInjection>
                  <bytecodeInjection>
                     <expression>${infinispan.codename}</expression>
                     <targetMembers>
                        <methodBodyReturn>
                           <className>org.infinispan.Version$Injected</className>
                           <methodName>getCodename</methodName>
                        </methodBodyReturn>
                     </targetMembers>
                  </bytecodeInjection>
               </bytecodeInjections>
            </configuration>
         </plugin>
         <plugin>
            <groupId>org.apache.felix</groupId>
            <artifactId>maven-bundle-plugin</artifactId>
            <configuration>
               <instructions>
                  <Export-Package>
                     !${project.groupId}.commons.*,
                     org.infinispan.marshall.core,
                     ${project.groupId}.*;version=${project.version};-split-package:=error
                  </Export-Package>
                  <Import-Package>
                  !sun.reflect,
                  *
                  </Import-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>
                  <DynamicImport-Package>*</DynamicImport-Package>
               </instructions>
            </configuration>
         </plugin>
         <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>build-helper-maven-plugin</artifactId>
            <executions>
               <execution>
                  <id>attach-artifacts</id>
                  <phase>package</phase>
                  <goals>
                     <goal>attach-artifact</goal>
                  </goals>
                  <configuration>
                     <artifacts>
                        <artifact>
                           <file>target/classes/features.xml</file>
                           <type>xml</type>
                           <classifier>features</classifier>
                        </artifact>
                     </artifacts>
                  </configuration>
               </execution>
            </executions>
         </plugin>
      </plugins>
   </build>

</project>