<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</artifactId>
    <version>2.2.1</version>
  </parent>

  <groupId>com.soebes.maven.extensions</groupId>
  <artifactId>incremental-module-builder</artifactId>
  <version>0.2.0</version>
  <name>Maven Incremental Module Builder</name>

  <properties>
    <scm.version>1.9.5</scm.version>
    <mavenVersion>3.2.5</mavenVersion>
    <gmaven-plugin.version>1.5</gmaven-plugin.version>
    <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
    <smpp.component>incremental-module-builder</smpp.component>
  </properties>

  <scm>
    <developerConnection>scm:git:ssh://git@github.com/khmarbaise/incremental-module-builder.git</developerConnection>
    <connection>scm:git:https://github.com/khmarbaise/incremental-module-builder.git</connection>
    <url>https://github.com/khmarbaise/incremental-module-builder/</url>
    <tag>incremental-module-builder-0.2.0</tag>
  </scm>
  <dependencies>

    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-utils</artifactId>
      <version>3.0.24</version>
    </dependency>
    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-container-default</artifactId>
      <version>1.7</version>
    </dependency>
    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-component-annotations</artifactId>
      <version>1.7</version>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>1.7.5</version>
      <scope>provided</scope>
    </dependency>

    <!-- test dependencies -->
    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-nop</artifactId>
      <version>1.7.5</version>
      <scope>test</scope>
    </dependency>


    <dependency>
      <groupId>org.apache.maven.scm</groupId>
      <artifactId>maven-scm-manager-plexus</artifactId>
      <version>${scm.version}</version>
    </dependency>

    <!-- providers declaration -->
    <dependency>
      <groupId>org.apache.maven.scm</groupId>
      <artifactId>maven-scm-provider-accurev</artifactId>
      <version>${scm.version}</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.scm</groupId>
      <artifactId>maven-scm-provider-bazaar</artifactId>
      <version>${scm.version}</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.scm</groupId>
      <artifactId>maven-scm-provider-clearcase</artifactId>
      <version>${scm.version}</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.scm</groupId>
      <artifactId>maven-scm-provider-cvsexe</artifactId>
      <version>${scm.version}</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.scm</groupId>
      <artifactId>maven-scm-provider-cvsjava</artifactId>
      <version>${scm.version}</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.scm</groupId>
      <artifactId>maven-scm-provider-gitexe</artifactId>
      <version>${scm.version}</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.scm</groupId>
      <artifactId>maven-scm-provider-hg</artifactId>
      <version>${scm.version}</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.scm</groupId>
      <artifactId>maven-scm-provider-jazz</artifactId>
      <version>${scm.version}</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.scm</groupId>
      <artifactId>maven-scm-provider-local</artifactId>
      <version>${scm.version}</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.scm</groupId>
      <artifactId>maven-scm-provider-perforce</artifactId>
      <version>${scm.version}</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.scm</groupId>
      <artifactId>maven-scm-provider-starteam</artifactId>
      <version>${scm.version}</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.scm</groupId>
      <artifactId>maven-scm-provider-svnexe</artifactId>
      <version>${scm.version}</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.scm</groupId>
      <artifactId>maven-scm-provider-synergy</artifactId>
      <version>${scm.version}</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.scm</groupId>
      <artifactId>maven-scm-provider-vss</artifactId>
      <version>${scm.version}</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.scm</groupId>
      <artifactId>maven-scm-provider-tfs</artifactId>
      <version>${scm.version}</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>com.perforce.p4maven</groupId>
      <artifactId>p4maven-provider</artifactId>
      <version>1.0.6</version>
      <scope>runtime</scope>
    </dependency>

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

    <dependency>
      <groupId>commons-lang</groupId>
      <artifactId>commons-lang</artifactId>
      <version>2.6</version>
    </dependency>
  </dependencies>
  <distributionManagement>
    <site>
      <id>github</id>
      <url>scm:git:git@github.com:khmarbaise/incremental-module-builder.git</url>
    </site>
  </distributionManagement>

  <build>
    <plugins>
      <plugin>
        <groupId>org.codehaus.plexus</groupId>
        <artifactId>plexus-component-metadata</artifactId>
        <version>1.7</version>
        <executions>
          <execution>
            <id>generate-metadata</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>generate-metadata</goal>
              <goal>generate-test-metadata</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    
<!--       <plugin> -->
<!--         <groupId>org.eclipse.sisu</groupId> -->
<!--         <artifactId>sisu-maven-plugin</artifactId> -->
<!--         <version>0.3.3</version> -->
<!--         <executions> -->
<!--           <execution> -->
<!--             <id>index-project</id> -->
<!--             <goals> -->
<!--               <goal>main-index</goal> -->
<!--               <goal>test-index</goal> -->
<!--             </goals> -->
<!--           </execution> -->
<!--         </executions> -->
<!--       </plugin>     -->


      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>buildnumber-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>get-buildnumber</id>
            <phase>validate</phase>
            <goals>
              <goal>create</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <doCheck>false</doCheck>
          <doUpdate>false</doUpdate>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>templating-maven-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>filter-sources</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>


  <profiles>
    <profile>
      <id>run-its</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.gmaven</groupId>
            <artifactId>gmaven-plugin</artifactId>
            <version>1.5</version>
            <dependencies>
              <dependency>
                <groupId>org.codehaus.groovy</groupId>
                <artifactId>groovy</artifactId>
                <version>1.8.4</version>
              </dependency>
              <dependency>
                <groupId>org.codehaus.gmaven.runtime</groupId>
                <artifactId>gmaven-runtime-1.8</artifactId>
                <version>1.4</version>
              </dependency>
            </dependencies>
            <configuration>
              <debug>false</debug>
              <verbose>true</verbose>
              <stacktrace>true</stacktrace>
              <defaultScriptExtension>.groovy</defaultScriptExtension>
            </configuration>
            <executions>
              <execution>
                <goals>
                  <goal>testCompile</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-invoker-plugin</artifactId>
            <dependencies>
              <dependency>
                <groupId>org.codehaus.groovy</groupId>
                <artifactId>groovy</artifactId>
                <version>1.8.4</version>
              </dependency>
              <dependency>
                <groupId>org.codehaus.gmaven.runtime</groupId>
                <artifactId>gmaven-runtime-1.8</artifactId>
                <version>1.4</version>
              </dependency>
            </dependencies>
            <configuration>
              <addTestClassPath>true</addTestClassPath>
              <debug>false</debug>
              <localRepositoryPath>${localRepositoryPath}</localRepositoryPath>
              <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
              <projectsDirectory>src/it</projectsDirectory>
              <showVersion>true</showVersion>
              <preBuildHookScript>setup</preBuildHookScript>
              <postBuildHookScript>verify</postBuildHookScript>
              <settingsFile>src/it/settings.xml</settingsFile>
              <!-- Currently working with more than one thread does not work, cause it is not guaranteed that the setup-config project
                is build at first. see also http://jira.codehaus.org/browse/MINVOKER-147 -->
              <parallelThreads>1</parallelThreads>
              <filterProperties>
                <pluginPropertyUsedForFiltering>localRepositoryPath</pluginPropertyUsedForFiltering>
              </filterProperties>
            </configuration>
            <executions>
              <execution>
                <id>pre-integration-tests</id>
                <goals>
                  <goal>install</goal>
                </goals>
                <configuration>
                  <extraArtifacts>
                    <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-jar-plugin:2.5:maven-plugin</extraArtifact>
                    <extraArtifact>org.apache.maven.plugins:maven-surefire-plugin:2.17:maven-plugin</extraArtifact>
                    <extraArtifact>org.apache.maven.surefire:surefire-testng:2.17:jar</extraArtifact>
                    <extraArtifact>org.apache.maven.surefire:surefire-testng-utils:2.17:jar</extraArtifact>
                    <extraArtifact>org.apache.maven.plugins:maven-failsafe-plugin:2.17:maven-plugin</extraArtifact>
                    <extraArtifact>org.apache.maven.plugins:maven-resources-plugin:2.7:maven-plugin</extraArtifact>
                    <extraArtifact>org.apache.maven.plugins:maven-assembly-plugin:2.5.3:maven-plugin</extraArtifact>
                    <extraArtifact>com.soebes.smpp:smpp:0.6.5:pom</extraArtifact>
                    <extraArtifact>org.testng:testng:6.8.8:jar</extraArtifact>
                    <extraArtifact>com.beust:jcommander:1.35:jar</extraArtifact>
                    <extraArtifacts>org.easytesting:fest-assert:1.4:jar</extraArtifacts>
                    <extraArtifacts>org.easytesting:fest-assert-core:2.0M10:jar</extraArtifacts>
                  </extraArtifacts>
                </configuration>
              </execution>
              <execution>
                <id>integration-tests</id>
                <goals>
                  <goal>run</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>
