<?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.server</groupId>
       <artifactId>infinispan-server-versions</artifactId>
       <version>7.2.1.Final</version>
       <relativePath>../versions/pom.xml</relativePath>
    </parent>

    <artifactId>infinispan-server-cli</artifactId>

    <name>Infinispan Server: Command line interface</name>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <includes>
                        <include>**/*TestCase.java</include>
                    </includes>
                    <enableAssertions>false</enableAssertions>
                    <systemPropertyVariables>
                        <jboss.cli.config>${project.basedir}/../build/src/main/resources/bin/jboss-cli.xml</jboss.cli.config>
                    </systemPropertyVariables>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <shadedArtifactAttached>true</shadedArtifactAttached>
                            <shadedClassifierName>client</shadedClassifierName>
                            <transformers>
                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                                    <mainClass>org.jboss.as.cli.CommandLineMain</mainClass>
                                </transformer>
                            </transformers>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>org.jboss.aesh</groupId>
            <artifactId>aesh</artifactId>
        </dependency>

        <dependency>
            <groupId>org.jboss</groupId>
            <artifactId>staxmapper</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wildfly</groupId>
            <artifactId>wildfly-controller-client</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wildfly</groupId>
            <artifactId>wildfly-cli</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.logging</groupId>
            <artifactId>jboss-logging</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.logging</groupId>
            <artifactId>jboss-logging-processor</artifactId>
            
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.jboss.sasl</groupId>
            <artifactId>jboss-sasl</artifactId>
        </dependency>

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

        <dependency>
           <groupId>org.jboss.remotingjmx</groupId>
           <artifactId>remoting-jmx</artifactId>
        </dependency>

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

        
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>linux-windows</id>
            <activation>
                <file><exists>${java.home}/../lib/tools.jar</exists></file>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>sun.jdk</groupId>
                    <artifactId>jconsole</artifactId>
                    <version>jdk</version>
                    <scope>system</scope>
                    <systemPath>${java.home}/../lib/jconsole.jar</systemPath>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>os-x</id>
            <activation>
                <file><exists>${java.home}/bundle/Classes/classes.jar</exists></file>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>sun.jdk</groupId>
                    <artifactId>jconsole</artifactId>
                    <version>jdk</version>
                    <scope>system</scope>
                    <systemPath>${java.home}/bundle/Classes/jconsole.jar</systemPath>
                </dependency>
            </dependencies>
        </profile>
    </profiles>
</project>