<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>metridoc-parent</artifactId>
        <groupId>com.googlecode.metridoc</groupId>
        <version>0.4.2</version>
    </parent>

    <description>performs penn specific ezproxy loading</description>
    <modelVersion>4.0.0</modelVersion>
    <artifactId>metridoc-ezproxy</artifactId>
    <packaging>jar</packaging>
    <name>${project.artifactId}-${project.version}</name>

    <dependencies>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>metridoc-core</artifactId>
            <version>${project.version}</version>
        </dependency>
    </dependencies>

    <build>
        <resources>

            <!-- this allows groovy source files and resources to live in the same place -->
            <!-- this allows us to simplify the project structure, now we can use metridoc groovy to run jobs -->
            <resource>
                <directory>src/main/groovy</directory>
                <filtering>true</filtering>
                <excludes>
                    <exclude>**/*.groovy</exclude>
                </excludes>
            </resource>
        </resources>
        <plugins>
            <!--
                Using the dependency plugin to make sure the schemas are in sync with the schema library during
                development.  If one needs to change a schema that is downloaded and does not want it overwritten,
                they should either delete the phase so it doesn't run, switch overWrite to false or just delete the
                whole plugin
            -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-schemas</id>
                        <goals>
                            <goal>unpack</goal>
                        </goals>
                        <phase>generate-resources</phase>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>metridoc-schemas</artifactId>
                                    <version>${project.version}</version>
                                    <type>jar</type>
                                    <overWrite>true</overWrite>
                                    <outputDirectory>${project.basedir}/src/main/groovy</outputDirectory>
                                    <includes>liquibase/base/*.xml,liquibase/ezproxy/*.xml</includes>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.codehaus.gmaven</groupId>
                <artifactId>gmaven-plugin</artifactId>
            </plugin>

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