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

    Copyright (c) 2012 to original author or authors
    All rights reserved. This program and the accompanying materials
    are made available under the terms of the Eclipse Public License v1.0
    which accompanies this distribution, and is available at
    http://www.eclipse.org/legal/epl-v10.html

-->

<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>
  <groupId>io.takari</groupId>
  <artifactId>takari</artifactId>
  <version>12</version>
  <packaging>pom</packaging>
  <name>Takari</name>
  <url>http://takari.io</url>
  <description>Takari: The future of software delivery.</description>
  <licenses>
    <license>
      <name>The Eclipse Public License, Version 1.0</name>
      <url>http://www.eclipse.org/legal/epl-v10.html</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <developers>
    <developer>
      <id>jvanzyl</id>
      <name>Jason van Zyl</name>
      <roles>
        <role>Project Lead</role>
      </roles>
      <timezone>-5</timezone>
    </developer>  
    <developer>
      <id>ifedorenko</id>
      <name>Igor Fedorenko</name>
      <email>igor@ifedorenko.com</email>
      <organization>Sonatype</organization>
      <roles>
        <role>Project Lead</role>
      </roles>
      <timezone>-5</timezone>
    </developer>
  </developers>

  <distributionManagement>
    <repository>
      <id>takari.releases</id>
      <name>${releaseName}</name>
      <url>${releaseUrl}</url>
    </repository>
    <snapshotRepository>
      <id>takari.snapshots</id>
      <name>${snapshotName}</name>
      <url>${snapshotUrl}</url>
    </snapshotRepository>
  </distributionManagement>
  <properties>
    <repoHost>http://otto.takari.io:8081</repoHost>
    <releaseName>Takari Releases</releaseName>
    <releaseUrl>${repoHost}/nexus/service/local/staging/deploy/maven2</releaseUrl>
    <snapshotName>Takari Snapshots</snapshotName>
    <snapshotUrl>${repoHost}/nexus/content/repositories/snapshots</snapshotUrl>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>
  
  <scm>
    <connection>scm:git:git@github.com:takari/takari-pom.git</connection>
    <developerConnection>scm:git:git@github.com:takari/takari-pom.git</developerConnection>
    <url>http://github.com/takari/takari-pom</url>
    <tag>takari-12</tag>
  </scm>
    
  <build>
    <pluginManagement>
      <plugins>
        <!-- set versions of common plugins for reproducibility, ordered alphabetically -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-antrun-plugin</artifactId>
          <version>1.6</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-assembly-plugin</artifactId>
          <version>2.2.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-clean-plugin</artifactId>
          <version>2.4.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>2.3.2</version>
          <configuration>
            <source>1.7</source>
            <target>1.7</target>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>2.6</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-docck-plugin</artifactId>
          <version>1.0</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-enforcer-plugin</artifactId>
          <version>1.0.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-gpg-plugin</artifactId>
          <version>1.3</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-install-plugin</artifactId>
          <version>2.3.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-invoker-plugin</artifactId>
          <version>1.5</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>2.3.1</version>
          <configuration>
            <archive>
              <manifest>
                <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
              </manifest>
            </archive>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>2.8</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-plugin-plugin</artifactId>
          <version>3.3</version>
        </plugin>
        <!-- START SNIPPET: release-plugin-configuration -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.5</version>
          <configuration>
            <localCheckout>true</localCheckout>
            <pushChanges>false</pushChanges>
            <useReleaseProfile>false</useReleaseProfile>
            <goals>deploy</goals>
            <arguments>-Ptakari-release</arguments>
          </configuration>
        </plugin>
        <!-- END SNIPPET: release-plugin-configuration -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-remote-resources-plugin</artifactId>
          <version>1.2.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <version>2.5</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-scm-plugin</artifactId>
          <version>1.4</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-site-plugin</artifactId>
          <version>3.0</version>
          <dependencies>
            <dependency>
              <groupId>org.apache.maven.wagon</groupId>
              <artifactId>wagon-ssh</artifactId>
              <version>1.0</version>
            </dependency>
          </dependencies>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>2.1.2</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.9</version>
        </plugin>
        <plugin>
          <groupId>io.tesla.maven.plugins</groupId>
          <artifactId>tesla-license-plugin</artifactId>
          <version>1.0.0</version>
          <configuration>
            <aggregate>true</aggregate>
            <strictCheck>true</strictCheck>
            <header>license-header.txt</header>
            <useDefaultExcludes>false</useDefaultExcludes>
            <includes>
              <include>**/pom.xml</include>
              <include>**/*.xml</include>
              <include>**/*.xsd</include>
              <include>**/*.xjb</include>
              <include>**/*.mdo</include>
              <include>**/*.properties</include>
              <include>**/*.java</include>
              <include>**/*.groovy</include>
              <include>**/*.scala</include>
              <include>**/*.aj</include>
              <include>**/*.js</include>
              <include>**/*.css</include>
            </includes>
            <excludes>
              <exclude>**/target/**</exclude>
              <exclude>**/conf/**</exclude>
              <exclude>**/.*</exclude>
              <exclude>**/.idea/**</exclude>
              <exclude>**/src/test/resources/*.scala</exclude>
              <exclude>**/release.properties</exclude>
            </excludes>
            <mapping>
              <scala>JAVADOC_STYLE</scala>
              <xjb>XML_STYLE</xjb>
              <mdo>XML_STYLE</mdo>
            </mapping>
          </configuration>
          <executions>
            <execution>
              <goals>
                <goal>check</goal>
              </goals>
            </execution>
          </executions>
        </plugin>          
        <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
        <plugin>
          <groupId>org.eclipse.m2e</groupId>
          <artifactId>lifecycle-mapping</artifactId>
          <version>1.0.0</version>
          <configuration>
            <lifecycleMappingMetadata>
              <pluginExecutions>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>io.tesla.maven.plugins</groupId>
                    <artifactId>tesla-license-plugin</artifactId>
                    <versionRange>[1.0.0,)</versionRange>
                    <goals>
                      <goal>check</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>        
      </plugins>
    </pluginManagement>
  </build>

  <profiles>
    <!-- START SNIPPET: release-profile -->
    <profile>
      <id>takari-release</id>
      <build>
        <plugins>
          <!-- We want to sign the artifact, the POM, and all attached artifacts -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <configuration>
              <passphrase>${gpg.passphrase}</passphrase>
            </configuration>
            <executions>
              <execution>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <!-- We want to deploy the artifact to a staging location for perusal -->
          <plugin>
            <inherited>true</inherited>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-deploy-plugin</artifactId>
            <configuration>
              <updateReleaseInfo>true</updateReleaseInfo>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <configuration>
              <encoding>${project.build.sourceEncoding}</encoding>
            </configuration>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <skip>true</skip>
            </configuration>
          </plugin>          
        </plugins>
      </build>
    </profile>
    <!-- END SNIPPET: release-profile -->
  </profiles>
</project>
