<?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>annotations</artifactId>
        <groupId>io.sundr</groupId>
        <version>0.220.0</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>builder-annotations</artifactId>
    <name>Sundrio :: Annotations :: Builder</name>

    <build>
        <plugins>
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven-compiler-plugin.version}</version>
                <configuration>
                    <annotationProcessors>
                        <processor>io.sundr.resourcecify.internal.processor.ResourcecifyProcessor</processor>
                    </annotationProcessors>
                </configuration>
            </plugin>
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-shade-plugin</artifactId>
              <version>${maven-shade-plugin.version}</version>
              <executions>
                <execution>
                  <id>normal</id>
                  <phase>package</phase>
                  <goals>
                    <goal>shade</goal>
                  </goals>
                  <configuration>
                    <shadedArtifactAttached>true</shadedArtifactAttached>
                    <shadedClassifierName>internal</shadedClassifierName> 
                    <artifactSet>
                      <includes>
                        <include>io.sundr:*</include>
                      </includes>
                    </artifactSet>
                    <relocations>
                      <relocation>
                        <pattern>io.sundr</pattern>
                        <shadedPattern>io.sundr.internal</shadedPattern>
                      </relocation>
                    </relocations>
                    <transformers>
                      <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
                    </transformers>
                    <createDependencyReducedPom>false</createDependencyReducedPom>
                  </configuration>
                </execution>
              </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-invoker-plugin</artifactId>
                <version>${maven-invoker-plugin.version}</version>
                <configuration>
                    <debug>false</debug>
                    <projectsDirectory>src/it</projectsDirectory>
                    <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
                    <pomIncludes>
                        <pomInclude>*/pom.xml</pomInclude>
                    </pomIncludes>
                    <postBuildHookScript>verify</postBuildHookScript>
                    <showErrors>true</showErrors>
                    <streamLogs>true</streamLogs>
                    <mavenOpts>-Xmx1024m</mavenOpts>
                    <goals>
                        <goal>clean</goal>
                        <goal>install</goal>
                    </goals>
                </configuration>
                <executions>
                    <execution>
                        <id>integration-test</id>
                        <goals>
                            <goal>install</goal>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

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

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

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

        <dependency>
            <groupId>javax.validation</groupId>
            <artifactId>validation-api</artifactId>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.sundr</groupId>
            <artifactId>sundr-adapter-source</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>com.google.testing.compile</groupId>
          <artifactId>compile-testing</artifactId>
          <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-all</artifactId>
            <scope>test</scope>
        </dependency>

    </dependencies>

</project>
