<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>

    <parent>
        <groupId>com.ovea</groupId>
        <artifactId>ovea</artifactId>
        <version>2</version>
    </parent>

    <artifactId>ovea-system</artifactId>
    <version>1.7.ga</version>
    <packaging>jar</packaging>

    <name>ovea-system</name>
    <description>System utilities</description>

    <scm>
        <connection>scm:git:git@github.com:Ovea/system.git</connection>
        <developerConnection>scm:git:git@github.com:Ovea/system.git</developerConnection>
        <url>http://github.com/Ovea/system</url>
    </scm>

    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.groovy.maven</groupId>
                <artifactId>gmaven-plugin</artifactId>
                <version>1.0</version>
                <dependencies>
                    <dependency>
                        <groupId>org.codehaus.groovy</groupId>
                        <artifactId>groovy-all</artifactId>
                        <version>1.8.1</version>
                    </dependency>
                </dependencies>
                <executions>
                    <execution>
                        <goals>
                            <goal>compile</goal>
                            <goal>testCompile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-shade-plugin</artifactId>
                <executions>
                    <execution>
                        <id>standard</id>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <shadedArtifactAttached>true</shadedArtifactAttached>
                            <!--<createSourcesJar>true</createSourcesJar>-->
                            <shadedClassifierName>all</shadedClassifierName>
                            <artifactSet>
                                <includes>
                                    <include>net.java.dev.jna:jna</include>
                                    <include>net.java.dev.jna:jna:plateform</include>
                                    <include>org.fusesource:sigar</include>
                                    <include>org.fusesource:sigar:native</include>
                                </includes>
                            </artifactSet>
                            <!--<relocations>
                                <relocation>
                                    <pattern>com.sun.jna</pattern>
                                    <shadedPattern>com.ovea.system.internal.jna</shadedPattern>
                                </relocation>
                                <relocation>
                                    <pattern>org.hyperic</pattern>
                                    <shadedPattern>com.ovea.system.internal.sigar</shadedPattern>
                                </relocation>
                            </relocations>-->
                            <transformers>
                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                                    <mainClass>com.ovea.system.test.Main</mainClass>
                                </transformer>
                            </transformers>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <!-- internal -->
        <dependency>
            <groupId>net.java.dev.jna</groupId>
            <artifactId>jna</artifactId>
            <version>3.3.0</version>
        </dependency>
        <dependency>
            <groupId>net.java.dev.jna</groupId>
            <artifactId>jna</artifactId>
            <version>3.3.0</version>
            <classifier>platform</classifier>
        </dependency>

        <dependency>
            <groupId>org.fusesource</groupId>
            <artifactId>sigar</artifactId>
            <version>1.6.4</version>
            <exclusions>
                <exclusion>
                    <groupId>log4j</groupId>
                    <artifactId>log4j</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>com.sun</groupId>
            <artifactId>tools</artifactId>
            <version>1.7</version>
            <scope>system</scope>
            <systemPath>${java.home}/../lib/tools.jar</systemPath>
            <optional>true</optional>
        </dependency>

        <!-- Testing -->
        <dependency>
            <groupId>com.mycila</groupId>
            <artifactId>mycila-junit</artifactId>
            <version>1.2.ga</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>1.8.5</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-all</artifactId>
            <version>1.8.1</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

</project>

