<?xml version="1.0" encoding="UTF-8"?>
<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">
    <parent>
        <artifactId>connectors</artifactId>
        <groupId>org.jboss.teiid</groupId>
        <version>8.10.0.Final</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <artifactId>connector-infinispan.6</artifactId>
    <groupId>org.jboss.teiid.connectors</groupId>
    <name>Infinispan Connector 6</name>
    <description>This connector creates the connection to the Infinispan Cache</description>
    	
    <properties>
        <!-- slot defined in the module  -->
        <jdg.slot>jdg-6.4</jdg.slot>
    </properties>   

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.infinispan</groupId>
                <artifactId>infinispan-client-hotrod</artifactId>
                <version>${version.org.infinispan.6}</version>
            </dependency>

            <dependency>
                <groupId>org.infinispan</groupId>
                <artifactId>infinispan-server-hotrod</artifactId>
                <version>${version.org.infinispan.6}</version>
            </dependency>
            <dependency>
                <groupId>org.infinispan</groupId>
                <artifactId>infinispan-core</artifactId>
                <version>${version.org.infinispan.6}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>


    <dependencies>

        <dependency>
            <groupId>org.jboss.teiid</groupId>
            <artifactId>teiid-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.teiid</groupId>
            <artifactId>teiid-common-core</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.teiid.connectors</groupId>
            <artifactId>translator-object</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.teiid.connectors</groupId>
            <artifactId>translator-object</artifactId>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>javax.resource</groupId>
            <artifactId>connector-api</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-search</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.jboss.modules</groupId>
            <artifactId>jboss-modules</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.infinispan</groupId>
            <artifactId>infinispan-client-hotrod</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.infinispan</groupId>
            <artifactId>infinispan-server-hotrod</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.infinispan</groupId>
            <artifactId>infinispan-core</artifactId>
            <scope>provided</scope>
        </dependency>
    </dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.felix</groupId>
				<artifactId>maven-bundle-plugin</artifactId>
				<extensions>true</extensions>
				<executions>
					<execution>
						<id>bundle</id>
						<phase>process-classes</phase>
						<goals>
							<goal>bundle</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<classifier>lib</classifier>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-rar-plugin</artifactId>
				<executions>
					<execution>
						<id>build_rar</id>
						<phase>package</phase>
						<goals>
							<goal>rar</goal>
						</goals>
						<configuration>
							<finalName>${project.artifactId}-${project.version}</finalName>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-antrun-plugin</artifactId>
				<executions>
					<execution>
						<id>prepare</id>
						<phase>package</phase>
						<configuration>
							<tasks>
								<unzip src="${project.build.directory}/${project.artifactId}-${project.version}.rar" dest="${project.build.directory}/rar-unpack" />
							</tasks>
						</configuration>
						<goals>
							<goal>run</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>build-helper-maven-plugin</artifactId>
				<executions>
					<execution>
						<id>rar</id>
						<phase>package</phase>
						<goals>
							<goal>attach-artifact</goal>
						</goals>
						<configuration>
							<artifacts>
								<artifact>
									<file>${project.build.directory}/${project.artifactId}-${project.version}.rar</file>
									<type>rar</type>
								</artifact>
							</artifacts>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<artifactId>maven-assembly-plugin</artifactId>
				<configuration>
					<descriptors>
						<descriptor>kits/jboss-as7-dist.xml</descriptor>
						<descriptor>kits/embedded-dist.xml</descriptor>
					</descriptors>
				</configuration>
				<executions>
					<execution>
						<id>create-assemblies</id>
						<phase>package</phase>
						<goals>
							<goal>single</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

		</plugins>
	</build>
</project>
 
