<?xml version="1.0" encoding="UTF-8"?>
<!--
    Copyright (C) 2006-2007 the original author or authors.

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
-->

<!-- $Id$ -->

<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>org.codehaus.gmaven</groupId>
        <artifactId>gmaven</artifactId>
        <version>1.5</version>
    </parent>

    <artifactId>gmaven-plugin</artifactId>
    <name>GMaven Plugin</name>
    <packaging>maven-plugin</packaging>

    <description>
        Provides support for execution, compilation and other facets of Groovy development.
    </description>

    <dependencies>
        <dependency>
            <groupId>org.codehaus.gmaven.runtime</groupId>
            <artifactId>gmaven-runtime-api</artifactId>
        </dependency>

        <dependency>
            <groupId>org.codehaus.gmaven.runtime</groupId>
            <artifactId>gmaven-runtime-loader</artifactId>
        </dependency>

        <dependency>
            <groupId>org.codehaus.gmaven.runtime</groupId>
            <artifactId>gmaven-runtime-support</artifactId>
        </dependency>

        <!-- For build ordering (for IT) -->
        <dependency>
            <groupId>org.codehaus.gmaven</groupId>
            <artifactId>gmaven-packaging</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- For build ordering (for IT) -->
        <dependency>
            <groupId>org.codehaus.gmaven.runtime</groupId>
            <artifactId>gmaven-runtime-1.5</artifactId>
            <scope>provided</scope>
        </dependency>

        <!--
        Using maven-core to allow access to Session, ExpressionEvaluator and related classes,
        excluding everything else which comes along with it which we don't need.
        -->
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-core</artifactId>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.apache.maven</groupId>
                    <artifactId>maven-settings</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.maven</groupId>
                    <artifactId>maven-plugin-parameter-documenter</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.maven.reporting</groupId>
                    <artifactId>maven-reporting-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.maven</groupId>
                    <artifactId>maven-profile</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.maven</groupId>
                    <artifactId>maven-model</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.maven</groupId>
                    <artifactId>maven-artifact</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.maven.wagon</groupId>
                    <artifactId>wagon-provider-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.maven.wagon</groupId>
                    <artifactId>wagon-file</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.maven.wagon</groupId>
                    <artifactId>wagon-http-lightweight</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.maven.wagon</groupId>
                    <artifactId>wagon-ssh-external</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.maven.wagon</groupId>
                    <artifactId>wagon-ssh</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.codehaus.plexus</groupId>
                    <artifactId>plexus-container-default</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.maven</groupId>
                    <artifactId>maven-repository-metadata</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.maven</groupId>
                    <artifactId>maven-error-diagnostics</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.maven</groupId>
                    <artifactId>maven-project</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.maven</groupId>
                    <artifactId>maven-plugin-registry</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>commons-cli</groupId>
                    <artifactId>commons-cli</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.maven</groupId>
                    <artifactId>maven-plugin-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.codehaus.plexus</groupId>
                    <artifactId>plexus-interactivity-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.maven</groupId>
                    <artifactId>maven-artifact-manager</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.maven</groupId>
                    <artifactId>maven-monitor</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.codehaus.plexus</groupId>
                    <artifactId>plexus-utils</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>classworlds</groupId>
                    <artifactId>classworlds</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.apache.maven.shared</groupId>
            <artifactId>file-management</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-artifact</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-plugin-descriptor</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.maven.reporting</groupId>
            <artifactId>maven-reporting-impl</artifactId>
        </dependency>

        <dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>

        <dependency>
            <groupId>org.sonatype.gossip</groupId>
            <artifactId>gossip</artifactId>
            <scope>runtime</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-plugin-plugin</artifactId>
                <configuration>
                    <goalPrefix>groovy</goalPrefix>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>descriptor</goal>
                            <goal>helpmojo</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-plugin-plugin</artifactId>
                <configuration>
                    <goalPrefix>groovy</goalPrefix>
                </configuration>
            </plugin>
        </plugins>
    </reporting>

    <profiles>
        <profile>
            <id>integration-tests</id>
            <activation>
                <property>
                    <name>it</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-invoker-plugin</artifactId>
                        <configuration>
                            <projectsDirectory>src/it</projectsDirectory>
                            <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
                            <pomIncludes>
                                <pomInclude>*/pom.xml</pomInclude>
                                <pomInclude>compile/*/pom.xml</pomInclude>
                                <pomInclude>execute/*/pom.xml</pomInclude>
                                <pomInclude>sources/*/pom.xml</pomInclude>
                            </pomIncludes>
                            <settingsFile>src/it/settings.xml</settingsFile>
                            <localRepositoryPath>${project.build.directory}/it-repo</localRepositoryPath>
                            <preBuildHookScript>setup.groovy</preBuildHookScript>
                            <postBuildHookScript>validate.groovy</postBuildHookScript>
                            <properties>
                                <gmaven.logging>TRACE</gmaven.logging>
                            </properties>
                        </configuration>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>install</goal>
                                    <goal>run</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>

