<?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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <artifactId>activejdbc-gradle-plugin</artifactId>
    <version>2.2</version>
    <name>JavaLite - Gradle Instrumentation Plugin</name>

    <parent>
        <groupId>org.javalite</groupId>
        <artifactId>activejdbc-root</artifactId>
        <version>2.2</version>
    </parent>



    <!-- NOTE: These dependencies are duplicated by necessity in build.gradle -->
    <dependencies>
        <dependency>
            <groupId>org.javalite</groupId>
            <artifactId>activejdbc</artifactId>
            <version>${project.version}</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.javalite</groupId>
            <artifactId>activejdbc-instrumentation</artifactId>
            <version>${project.version}</version>
            <scope>compile</scope>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>Windows</id>
            <activation>
                <os>
                    <family>Windows</family>
                </os>
            </activation>
            <properties>
                <gradleScript>.\gradlew.bat</gradleScript>
            </properties>
        </profile>
        <profile>
            <id>unix</id>
            <activation>
                <os>
                    <family>unix</family>
                </os>
            </activation>
            <properties>
                <gradleScript>./gradlew</gradleScript>
            </properties>
        </profile>
    </profiles>

    <build>

        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
            </plugin>
            <!-- Runs the gradle managed build which will produce all artifacts -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <version>1.4.0</version>
                <executions>
                    <execution>
                        <phase>compile</phase>
                        <goals>
                          <goal>exec</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <executable>${gradleScript}</executable>
                    <arguments>
                        <argument>build</argument>
                    </arguments>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>
