<?xml version="1.0" encoding="UTF-8"?>
<!--
  Copyright 2015 The original 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.
  -->

<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">
    <parent>
        <artifactId>sundr-pom</artifactId>
        <groupId>io.sundr</groupId>
        <version>0.200.0</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>sundr-maven-plugin</artifactId>
    <name>Sundrio :: Maven Plugin</name>
    <packaging>maven-plugin</packaging>

    <properties>
      <plexus.version>3.5.1</plexus.version>
    </properties>


    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-invoker-plugin</artifactId>
                <version>${maven-invoker-plugin.version}</version>
                <configuration>
                    <debug>false</debug>
                    <streamLogsOnFailures>true</streamLogsOnFailures>
                    <projectsDirectory>src/it</projectsDirectory>
                    <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
                    <!-- Opts for debuging
                    <mavenOpts>-Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -DaltDeploymentRepository=test-repo::default::file://${project.build.directory}/repository</mavenOpts> -->
                    <!-- Plain Opts -->
                    <mavenOpts>-DaltDeploymentRepository=test-repo::default::file://${project.build.directory}/repository</mavenOpts>
                    <pomIncludes>
                        <pomInclude>*/pom.xml</pomInclude>
                    </pomIncludes>
                    <postBuildHookScript>verify</postBuildHookScript>
                    <goals>
                        <goal>clean</goal>
                        <goal>install</goal>
                        <goal>deploy</goal>
                    </goals>
                </configuration>
                <executions>
                    <execution>
                        <id>integration-test</id>
                        <goals>
                            <goal>install</goal>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-plugin-plugin</artifactId>
                <version>${maven-plugin-plugin.version}</version>
                <executions>
                    <execution>
                        <id>default-descriptor</id>
                        <phase>process-classes</phase>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-core</artifactId>
            <version>${maven.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-compat</artifactId>
            <version>${maven.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-plugin-api</artifactId>
            <version>${maven.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.maven.plugin-tools</groupId>
            <artifactId>maven-plugin-annotations</artifactId>
            <version>${maven-plugin-annotations.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.maven.shared</groupId>
            <artifactId>maven-invoker</artifactId>
            <version>${maven.invoker.version}</version>
        </dependency>

        <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-utils</artifactId>
            <version>${plexus.version}</version>
        </dependency>

        <dependency>
            <groupId>io.sundr</groupId>
            <artifactId>sundr-core</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>io.sundr</groupId>
            <artifactId>sundr-codegen-apt</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>io.sundr</groupId>
            <artifactId>sundr-codegen-velocity</artifactId>
            <version>${project.version}</version>
        </dependency>

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

</project>
