<?xml version="1.0" encoding="UTF-8"?>

<!--
  Licensed to the Apache Software Foundation (ASF) under one
  or more contributor license agreements. See the NOTICE file
  distributed with this work for additional information
  regarding copyright ownership. The ASF licenses this file
  to you 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">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>com.soebes.smpp</groupId>
    <artifactId>smpp-plugins</artifactId>
    <version>2.2.1</version>
  </parent>

  <groupId>com.soebes.maven.plugins</groupId>
  <artifactId>iterator-maven-plugin</artifactId>
  <version>0.5.0</version>
  <packaging>maven-plugin</packaging>

  <name>The Iterator Maven Plugin.</name>
  <description>The idea is to execute other plugins multiple times
    based on a list of items which will be iterated over.
    Or invoke a separate maven instance based on the a list 
    of elements.</description>

  <!--
    ! The following is marked as deprecated for Maven 3. so using maven-enforcer-plugin as well
    ! https://issues.apache.org/jira/browse/MNG-4840
    ! https://issues.apache.org/jira/browse/MNG-5297
  -->
  <prerequisites>
    <maven>${maven.version}</maven>
  </prerequisites>

  <distributionManagement>
    <site>
      <id>github</id>
      <url>scm:git:ssh://git@github.com/khmarbaise/iterator-maven-plugin.git</url>
    </site>
  </distributionManagement>

  <properties>
    <maven.version>3.0</maven.version>
    <!--
      ! Make mvn site:stage working correctly in combination with scm-publish.
    -->
    <scmpublish.content>target/staging/${project.artifactId}</scmpublish.content>
  </properties>

  <!-- Must be overwritten in every project. -->
  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/khmarbaise/iterator-maven-plugin/issues</url>
  </issueManagement>

  <scm>
    <developerConnection>scm:git:ssh://git@github.com/khmarbaise/iterator-maven-plugin.git</developerConnection>
    <connection>scm:git:https://github.com/khmarbaise/iterator-maven-plugin.git</connection>
    <url>https://github.com/khmarbaise/iterator-maven-plugin</url>
    <tag>iterator-maven-plugin-0.5.0</tag>
  </scm>

  <contributors>
    <contributor>
      <name>Florian Fray</name>
      <email>florian.fray@itcf.biz</email>
      <url>http://itcf.biz</url>
      <roles>
        <role>Contributor</role>
      </roles>
    </contributor>
    <contributor>
      <name>Tunaki</name>
      <email>guillaume_boue@orange.fr</email>
      <url>https://github.com/Tunaki</url>
      <roles>
        <role>Contributor</role>
      </roles>
    </contributor>
  </contributors>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.rat</groupId>
          <artifactId>apache-rat-plugin</artifactId>
          <!--
            ! Can be removed if we change to smpp version 2.2.2
          -->
          <version>0.12</version>
          <configuration>
            <excludes combine.children="append">
              <exclude>README.md</exclude>
              <exclude>src/site/resources/attached-includes/css/shCoreDefault.css</exclude>
              <exclude>.travis.yml</exclude>
            </excludes>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.codehaus.gmaven</groupId>
          <artifactId>gmaven-plugin</artifactId>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-site-plugin</artifactId>
          <dependencies>
            <dependency>
              <groupId>org.tinyjee.dim</groupId>
              <artifactId>doxia-include-macro</artifactId>
              <version>1.1</version>
            </dependency>
          </dependencies>
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>
      <plugin>
        <groupId>org.apache.rat</groupId>
        <artifactId>apache-rat-plugin</artifactId>
        <executions>
          <execution>
            <phase>verify</phase>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.tinyjee.dim</groupId>
        <artifactId>doxia-include-macro</artifactId>
        <version>1.1</version>
        <executions>
          <execution>
            <id>initialize-doxia-include-macro</id>
            <phase>pre-site</phase>
            <goals>
              <goal>initialize</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <dependencies>

    <dependency>
      <groupId>org.testng</groupId>
      <artifactId>testng</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
      <scope>test</scope>
    </dependency>

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

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

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

    <dependency>
      <groupId>org.apache.maven.shared</groupId>
      <artifactId>maven-invoker</artifactId>
      <version>2.2</version>
    </dependency>

    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <scope>test</scope>
    </dependency>

    <!--
      ! currently needed for this:
      ! protected MavenPluginManagerHelper mavenPluginManagerHelper;
      ! TODO: Think about this.
    -->
    <dependency>
      <groupId>org.apache.maven.reporting</groupId>
      <artifactId>maven-reporting-exec</artifactId>
      <version>1.1</version>
    </dependency>

    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <version>2.4</version>
    </dependency>
  </dependencies>

  <profiles>
    <profile>
      <id>run-its</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.gmaven</groupId>
            <artifactId>gmaven-plugin</artifactId>
          </plugin>

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-invoker-plugin</artifactId>
            <configuration>
              <setupIncludes>
                <setupInclude>setup/pom.xml</setupInclude>
              </setupIncludes>
              <pomIncludes>
                <pomInclude>*/pom.xml</pomInclude>
              </pomIncludes>
            </configuration>
            <executions>
              <execution>
                <id>pre-integration-tests</id>
                <goals>
                  <goal>install</goal>
                </goals>
                <configuration>
                  <extraArtifacts>
                    <extraArtifact>org.hamcrest:hamcrest-core:1.3:jar</extraArtifact>
                    <extraArtifact>junit:junit:4.8:jar</extraArtifact>
                    <extraArtifact>org.codehaus.mojo:exec-maven-plugin:1.4.0:maven-plugin</extraArtifact>

                    <extraArtifact>org.apache.maven.surefire:surefire-junit4:2.18.1:jar</extraArtifact>
                    <extraArtifact>org.apache.maven.plugins:maven-compiler-plugin:3.2:maven-plugin</extraArtifact>
                    <extraArtifact>org.apache.maven.plugins:maven-install-plugin:2.5.2:maven-plugin</extraArtifact>
                    <extraArtifact>org.apache.maven.plugins:maven-clean-plugin:2.6.1:maven-plugin</extraArtifact>
                    <extraArtifact>org.apache.maven.plugins:maven-surefire-plugin:2.18.1:maven-plugin</extraArtifact>
                    <extraArtifact>org.apache.maven.plugins:maven-assembly-plugin:2.5.2:maven-plugin</extraArtifact>
                    <extraArtifact>org.apache.maven.plugins:maven-jar-plugin:2.5:maven-plugin</extraArtifact>
                    <extraArtifact>org.apache.maven.plugins:maven-war-plugin:2.5:maven-plugin</extraArtifact>
                    <extraArtifact>org.apache.maven.plugins:maven-resources-plugin:2.7:maven-plugin</extraArtifact>
                    <extraArtifact>org.apache.maven.plugins:maven-site-plugin:3.3:maven-plugin</extraArtifact>
                    <extraArtifact>org.apache.maven.wagon:wagon-ssh:2.4:jar</extraArtifact>
                    <extraArtifact>org.codehaus.plexus:plexus-utils:1.1:jar</extraArtifact>
                    <extraArtifact>com.soebes.smpp:smpp:0.7.0:pom</extraArtifact>
                    <extraArtifact>com.soebes.maven.plugins:maven-echo-plugin:0.1:maven-plugin</extraArtifact>
                    <extraArtifact>org.apache.commons:commons-lang3:3.4:jar</extraArtifact>
                  </extraArtifacts>
                </configuration>
              </execution>
              <execution>
                <id>integration-tests</id>
                <goals>
                  <goal>run</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
      <reporting>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-invoker-plugin</artifactId>
          </plugin>
        </plugins>
      </reporting>
    </profile>

  </profiles>


</project>
