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

    Copyright 2015-2016 Maven Source Dependencies
    Plugin contributors as indicated by the @author tags.

    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">
  <modelVersion>4.0.0</modelVersion>

  <groupId>org.srcdeps.mvn</groupId>
  <artifactId>srcdeps-maven-parent</artifactId>
  <version>2.1.0</version>
  <packaging>pom</packaging>

  <name>Srcdeps Maven Parent</name>
  <description>A set of tools for building dependencies from their sources during the build</description>
  <url>https://github.com/srcdeps/srcdeps-maven</url>
  <inceptionYear>2015</inceptionYear>
  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <developers>
    <developer>
      <id>ppalaga</id>
      <name>Peter Palaga</name>
      <timezone>Europe/Prague</timezone>
    </developer>
  </developers>

  <modules>
    <module>srcdeps-maven-base</module>
    <module>srcdeps-maven-local-repository</module>
    <module>srcdeps-maven-enforcer</module>
    <module>srcdeps-maven-quickstarts</module>
  </modules>

  <scm>
    <connection>scm:git:git@github.com:srcdeps/srcdeps-maven.git</connection>
    <developerConnection>scm:git:git@github.com:srcdeps/srcdeps-maven.git</developerConnection>
    <url>https://github.com/srcdeps/srcdeps-maven</url>
    <tag>2.1.0</tag>
  </scm>
  <issueManagement>
    <system>GitHub Issues</system>
    <url>https://github.com/srcdeps/srcdeps-maven/issues</url>
  </issueManagement>
  <distributionManagement>
    <snapshotRepository>
      <id>ossrh</id>
      <url>${snapshots.repo.url}</url>
    </snapshotRepository>
    <repository>
      <id>ossrh</id>
      <url>${releases.repo.url}</url>
    </repository>
  </distributionManagement>

  <properties>

    <!-- dependencies -->
    <version.io.takari.aether.takari-local-repository>0.11.2</version.io.takari.aether.takari-local-repository>
    <version.io.takari.maven.plugins>2.9.0</version.io.takari.maven.plugins>
    <version.junit>4.12</version.junit>
    <version.org.apache.maven>3.3.9</version.org.apache.maven>
    <!-- keep in sync with aetherVersion in maven
         around https://github.com/apache/maven/blob/master/pom.xml#L67 -->
    <version.org.eclipse.aether>1.0.2.v20150114</version.org.eclipse.aether>
    <!-- keep in sync with sisuInjectVersion in maven
         around https://github.com/apache/maven/blob/master/pom.xml#L61 -->
    <version.org.eclipse.sisu>0.3.2</version.org.eclipse.sisu>
    <version.org.slf4j>1.7.5</version.org.slf4j>
    <version.org.srcdeps.core>2.1.0</version.org.srcdeps.core>

    <!--
      Maven plugin versions
        Naming convention: version.${artifactId} whenever unique enough; otherwise version.${groupId}.${artifactId}
        Ordering: alphabetic
    -->
    <version.com.google.code.maven-replacer-plugin>1.5.3</version.com.google.code.maven-replacer-plugin>
    <version.com.mycila.license-maven-plugin>3.0</version.com.mycila.license-maven-plugin>
    <version.io.takari.maven.plugins.takari-lifecycle-plugin>1.11.12</version.io.takari.maven.plugins.takari-lifecycle-plugin>
    <version.mrm-maven-plugin>1.0.0</version.mrm-maven-plugin>
    <version.maven-antrun-plugin>1.7</version.maven-antrun-plugin>
    <version.maven-checkstyle-plugin>2.15</version.maven-checkstyle-plugin>
    <version.maven-clean-plugin>2.6.1</version.maven-clean-plugin>
    <version.maven-compiler-plugin>3.2</version.maven-compiler-plugin>
    <version.maven-deploy-plugin>2.8.2</version.maven-deploy-plugin>
    <version.maven-enforcer-plugin>1.3.1</version.maven-enforcer-plugin>
    <version.maven-gpg-plugin>1.6</version.maven-gpg-plugin>
    <version.maven-install-plugin>2.5.2</version.maven-install-plugin>
    <version.maven-jar-plugin>2.5</version.maven-jar-plugin>
    <version.maven-javadoc-plugin>2.10.3</version.maven-javadoc-plugin>
    <version.maven-release-plugin>2.5.2</version.maven-release-plugin>
    <version.maven-resources-plugin>2.7</version.maven-resources-plugin>
    <version.maven-scm-plugin>1.9.4</version.maven-scm-plugin>
    <version.maven-site-plugin>3.4</version.maven-site-plugin>
    <version.sisu-maven-plugin>0.3.3</version.sisu-maven-plugin>
    <version.maven-source-plugin>2.4</version.maven-source-plugin>
    <version.maven-surefire-plugin>2.19.1</version.maven-surefire-plugin>
    <version.nexus-staging-maven-plugin>1.6.5</version.nexus-staging-maven-plugin>
    <version.org.codehaus.buildnumber-maven-plugin>1.3</version.org.codehaus.buildnumber-maven-plugin>
    <version.org.codehaus.mojo.xml-maven-plugin>1.0.1</version.org.codehaus.mojo.xml-maven-plugin>
    <version.directory-maven-plugin>0.1</version.directory-maven-plugin>

    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

    <!-- maven-compiler-plugin -->
    <maven.compiler.source>1.7</maven.compiler.source>
    <maven.compiler.target>1.7</maven.compiler.target>
    <maven.compiler.showWarnings>true</maven.compiler.showWarnings>

    <!-- Checkstyle and maven-checkstyle-plugin -->
    <version.com.puppycrawl.tools.checkstyle>6.8</version.com.puppycrawl.tools.checkstyle>
    <!-- checkstyle.xml location in the source tree -->
    <checkstyle.consoleOutput>true</checkstyle.consoleOutput>
    <checkstyle.failOnError>true</checkstyle.failOnError>
    <checkstyle.includes>
      src/**/*.java
    </checkstyle.includes>
    <checkstyle.excludes>
      target/**
    </checkstyle.excludes>

    <!-- license-maven-plugin -->
    <license.failIfMissing>true</license.failIfMissing>
    <license.failIfUnknown>true</license.failIfUnknown>

    <!-- -Xdoclint:none disables javadoc validation -->
    <javadoc.doclint>-Xdoclint:none</javadoc.doclint>

    <!-- nexus-staging-maven-plugin -->
    <autoReleaseAfterClose>true</autoReleaseAfterClose>

    <!-- Repository Deployment URLs -->
    <oss.nexus.base.url>https://oss.sonatype.org</oss.nexus.base.url>
    <releases.repo.url>${oss.nexus.base.url}/service/local/staging/deploy/maven2/</releases.repo.url>
    <snapshots.repo.url>${oss.nexus.base.url}/content/repositories/snapshots/</snapshots.repo.url>

    <!-- maven-surefire-plugin -->
    <surefire.useFile>false</surefire.useFile>
    <trimStackTrace>false</trimStackTrace>

  </properties>

  <dependencyManagement>
    <dependencies>

      <dependency>
        <groupId>io.takari.aether</groupId>
        <artifactId>takari-local-repository</artifactId>
        <version>${version.io.takari.aether.takari-local-repository}</version>
      </dependency>

      <dependency>
        <groupId>io.takari.maven.plugins</groupId>
        <artifactId>takari-plugin-testing</artifactId>
        <version>${version.io.takari.maven.plugins}</version>
      </dependency>
      <dependency>
        <groupId>io.takari.maven.plugins</groupId>
        <artifactId>takari-plugin-integration-testing</artifactId>
        <version>${version.io.takari.maven.plugins}</version>
        <type>pom</type>
      </dependency>

      <dependency>
        <groupId>javax.inject</groupId>
        <artifactId>javax.inject</artifactId>
        <version>1</version>
      </dependency>

      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>${version.junit}</version>
      </dependency>

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

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

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

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

      <dependency>
        <groupId>org.eclipse.aether</groupId>
        <artifactId>aether-api</artifactId>
        <version>${version.org.eclipse.aether}</version>
      </dependency>
      <dependency>
        <groupId>org.eclipse.aether</groupId>
        <artifactId>aether-spi</artifactId>
        <version>${version.org.eclipse.aether}</version>
      </dependency>
      <dependency>
        <groupId>org.eclipse.aether</groupId>
        <artifactId>aether-impl</artifactId>
        <version>${version.org.eclipse.aether}</version>
      </dependency>

      <dependency>
        <groupId>org.eclipse.sisu</groupId>
        <artifactId>org.eclipse.sisu.inject</artifactId>
        <version>${version.org.eclipse.sisu}</version>
        <scope>provided</scope>
      </dependency>

      <dependency>
        <groupId>org.srcdeps.core</groupId>
        <artifactId>srcdeps-core-config-yaml</artifactId>
        <version>${version.org.srcdeps.core}</version>
      </dependency>
      <dependency>
        <groupId>org.srcdeps.core</groupId>
        <artifactId>srcdeps-core</artifactId>
        <version>${version.org.srcdeps.core}</version>
      </dependency>

      <dependency>
        <groupId>org.srcdeps.mvn</groupId>
        <artifactId>srcdeps-maven-local-repository</artifactId>
        <version>2.1.0</version>
      </dependency>
      <dependency>
        <groupId>org.srcdeps.mvn</groupId>
        <artifactId>srcdeps-maven-base</artifactId>
        <version>2.1.0</version>
      </dependency>
      <dependency>
        <groupId>org.srcdeps.mvn</groupId>
        <artifactId>srcdeps-maven-enforcer</artifactId>
        <version>2.1.0</version>
      </dependency>
      <dependency>
        <groupId>org.srcdeps.mvn</groupId>
        <artifactId>srcdeps-maven-quickstarts</artifactId>
        <version>2.1.0</version>
      </dependency>

      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>${version.org.slf4j}</version>
      </dependency>

      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-simple</artifactId>
        <version>${version.org.slf4j}</version>
      </dependency>

    </dependencies>
  </dependencyManagement>

  <build>
    <pluginManagement>
      <plugins>
        <!-- Ordering: alphabetic by groupId and artifactId -->

        <plugin>
          <groupId>com.google.code.maven-replacer-plugin</groupId>
          <artifactId>replacer</artifactId>
          <version>${version.com.google.code.maven-replacer-plugin}</version>
        </plugin>

        <plugin>
          <groupId>com.mycila</groupId>
          <artifactId>license-maven-plugin</artifactId>
          <version>${version.com.mycila.license-maven-plugin}</version>
        </plugin>

        <plugin>
          <groupId>io.takari.maven.plugins</groupId>
          <artifactId>takari-lifecycle-plugin</artifactId>
          <version>${version.io.takari.maven.plugins.takari-lifecycle-plugin}</version>
          <configuration>
            <!-- compile/testCompile -->
            <source>${maven.compiler.source}</source>
            <compilerId>jdt</compilerId>
            <transitiveDependencyReference>error</transitiveDependencyReference>
            <privatePackageReference>error</privatePackageReference>
            <proc>none</proc>

            <!-- jar -->
            <archive>
              <manifestFile>${project.build.directory}/MANIFEST.MF</manifestFile> <!-- generated by maven-antrun-plugin -->
            </archive>
            <sourceJar>true</sourceJar>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-antrun-plugin</artifactId>
          <version>${version.maven-antrun-plugin}</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-checkstyle-plugin</artifactId>
          <version>${version.maven-checkstyle-plugin}</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-clean-plugin</artifactId>
          <version>${version.maven-clean-plugin}</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>${version.maven-compiler-plugin}</version>
          <configuration>
            <!-- disable accidental use, must use takari-lifecycle -->
            <skip>true</skip>
            <skipMain>true</skipMain>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>${version.maven-deploy-plugin}</version>
          <configuration>
            <!-- disable accidental use, must use takari-lifecycle -->
            <skip>true</skip>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-enforcer-plugin</artifactId>
          <version>${version.maven-enforcer-plugin}</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-gpg-plugin</artifactId>
          <version>${version.maven-gpg-plugin}</version>
          <executions>
            <execution>
              <id>sign-artifacts</id>
              <phase>verify</phase>
              <goals>
                <goal>sign</goal>
              </goals>
            </execution>
          </executions>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-install-plugin</artifactId>
          <version>${version.maven-install-plugin}</version>
          <configuration>
            <!-- disable accidental use, must use takari-lifecycle -->
            <skip>true</skip>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>${version.maven-jar-plugin}</version>
          <configuration>
            <!-- disable accidental use, must use takari-lifecycle -->
            <skip>true</skip>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>${version.maven-javadoc-plugin}</version>
          <configuration>
                  <!-- disable accidental use, must use takari-lifecycle -->
            <skip>true</skip>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>${version.maven-release-plugin}</version>
          <configuration>
            <tagNameFormat>@{project.version}</tagNameFormat>
            <preparationGoals>clean generate-sources -Pbefore-release-commit</preparationGoals>
            <goals>deploy</goals>
            <releaseProfiles>release</releaseProfiles>
            <autoVersionSubmodules>true</autoVersionSubmodules>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <version>${version.maven-resources-plugin}</version>
          <configuration>
            <!-- disable accidental use, must use takari-lifecycle -->
            <skip>true</skip>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-scm-plugin</artifactId>
          <version>${version.maven-scm-plugin}</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-site-plugin</artifactId>
          <version>${version.maven-site-plugin}</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>${version.maven-source-plugin}</version>
          <configuration>
            <!-- disable accidental use, must use takari-lifecycle -->
            <skipSource>true</skipSource>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>${version.maven-surefire-plugin}</version>
          <configuration>
            <argLine>-Xmx512m</argLine>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>buildnumber-maven-plugin</artifactId>
          <version>${version.org.codehaus.buildnumber-maven-plugin}</version>
        </plugin>

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>mrm-maven-plugin</artifactId>
          <version>${version.mrm-maven-plugin}</version>
        </plugin>

        <plugin>
          <groupId>org.codehaus.gmavenplus</groupId>
          <artifactId>gmavenplus-plugin</artifactId>
          <version>${version.org.codehaus.gmavenplus.gmavenplus-plugin}</version>
        </plugin>

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>xml-maven-plugin</artifactId>
          <version>${version.org.codehaus.mojo.xml-maven-plugin}</version>
        </plugin>

        <plugin>
          <groupId>org.commonjava.maven.plugins</groupId>
          <artifactId>directory-maven-plugin</artifactId>
          <version>${version.directory-maven-plugin}</version>
        </plugin>

        <plugin>
          <groupId>org.sonatype.plugins</groupId>
          <artifactId>nexus-staging-maven-plugin</artifactId>
          <version>${version.nexus-staging-maven-plugin}</version>
        </plugin>

      </plugins>
    </pluginManagement>
    <plugins>
      <!-- Ordering: same as pluginManagement - alphabetic by the version property -->

      <plugin>
        <groupId>com.mycila</groupId>
        <artifactId>license-maven-plugin</artifactId>
        <configuration>
          <inlineHeader>Copyright ${license.git.copyrightYears} Maven Source Dependencies
Plugin contributors as indicated by the @author tags.

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.</inlineHeader>
          <excludes>
            <exclude>**/*.adoc</exclude>
            <exclude>**/README</exclude>
            <exclude>**/README.*</exclude>
            <exclude>**/LICENSE.*</exclude>
            <exclude>**/*.html</exclude>
            <exclude>**/*.htm</exclude>
            <exclude>mvnw</exclude>
            <exclude>mvnw.cmd</exclude>
          </excludes>
          <mapping>
            <yaml>SCRIPT_STYLE</yaml>
            <yml>SCRIPT_STYLE</yml>
          </mapping>
        </configuration>
        <dependencies>
          <dependency>
            <groupId>com.mycila</groupId>
            <artifactId>license-maven-plugin-git</artifactId>
            <version>${version.com.mycila.license-maven-plugin}</version>
          </dependency>
        </dependencies>
        <executions>
          <execution>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>io.takari.maven.plugins</groupId>
        <artifactId>takari-lifecycle-plugin</artifactId>
        <extensions>true</extensions>
        <executions>
          <execution>
            <!-- We turn takari-lifecycle-plugin's deploy off because we use nexus-staging-maven-plugin's deploy
                 that can auto-close and release the staging repo -->
            <id>default-deploy</id>
            <phase>none</phase>
            <goals>
              <goal>deploy</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <dependencies>
          <dependency>
            <groupId>com.puppycrawl.tools</groupId>
            <artifactId>checkstyle</artifactId>
            <version>${version.com.puppycrawl.tools.checkstyle}</version>
            <exclusions>
              <exclusion>
                <groupId>com.sun</groupId>
                <artifactId>tools</artifactId>
              </exclusion>
            </exclusions>
          </dependency>
        </dependencies>
        <executions>
          <execution>
            <id>checkstyle</id>
            <phase>verify</phase>
            <goals>
              <goal>checkstyle</goal>
            </goals>
            <configuration>
              <configLocation>${srcdeps-parent.basedir}/checkstyle.xml</configLocation>
              <consoleOutput>${checkstyle.consoleOutput}</consoleOutput>
              <failsOnError>${checkstyle.failOnError}</failsOnError>
              <excludes>${checkstyle.excludes}</excludes>
              <includes>${checkstyle.includes}</includes>
              <sourceDirectory>${basedir}</sourceDirectory>
              <useFile />
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <phase>prepare-package</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <target>
                <!-- A workaround for takari-lifecycle's unability to add custion manifest entries
                     https://github.com/takari/takari-lifecycle/issues/21 -->
                <manifest file="${project.build.directory}/MANIFEST.MF" encoding="${project.build.sourceEncoding}">
                  <attribute name="Built-By" value="${user.name}" />
                  <attribute name="Implementation-Title" value="${project.name}" />
                  <attribute name="Built-From-Git-Branch" value="${scmBranch}" />
                  <attribute name="Implementation-Version" value="${project.version}" />
                  <attribute name="Built-From-Git-SHA1" value="${buildNumber}" />
                  <attribute name="Implementation-Vendor-Id" value="${project.groupId}" />
                  <attribute name="Build-Jdk" value="${java.version}" />
                  <attribute name="Built-On" value="${timestamp}" />
                </manifest>
              </target>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <executions>
          <execution>
            <id>enforce-rules</id>
            <goals>
              <goal>enforce</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <rules>
            <requireMavenVersion>
              <version>[3.3.1,)</version>
            </requireMavenVersion>
            <requireJavaVersion>
              <version>[1.7,)</version>
            </requireJavaVersion>
            <requireNoRepositories />
            <requirePluginVersions />
          </rules>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.sonatype.plugins</groupId>
        <artifactId>nexus-staging-maven-plugin</artifactId>
        <extensions>true</extensions>
        <configuration>
          <nexusUrl>${oss.nexus.base.url}</nexusUrl>
          <!-- The server "id" element from settings to use authentication from -->
          <serverId>ossrh</serverId>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>buildnumber-maven-plugin</artifactId>
        <configuration>
          <locale>en_US</locale>
          <timestampFormat>{0,date,yyyy-MM-dd'T'HH:mm:ssX}</timestampFormat>
        </configuration>
        <executions>
          <execution>
            <phase>validate</phase>
            <goals>
              <goal>create</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>xml-maven-plugin</artifactId>
        <!-- *.xml and *.xsl are included by default -->
        <executions>
          <execution>
            <id>xml-check-format</id>
            <phase>verify</phase>
            <goals>
              <goal>check-format</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.commonjava.maven.plugins</groupId>
        <artifactId>directory-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>directories</id>
            <goals>
              <goal>directory-of</goal>
            </goals>
            <phase>initialize</phase>
            <configuration>
              <property>srcdeps-parent.basedir</property> <!-- Checkstyle will use this -->
              <project>
                <groupId>org.srcdeps.mvn</groupId>
                <artifactId>srcdeps-maven-parent</artifactId>
              </project>
            </configuration>
          </execution>
        </executions>
      </plugin>

    </plugins>
  </build>

  <profiles>
    <!--
      Ordering: alphabetic by id
    -->

    <profile>
      <id>release</id>
      <properties>
        <!-- This makes the buildnumber-maven-plugin fail in case of uncommitted local changes -->
        <maven.buildNumber.doCheck>true</maven.buildNumber.doCheck>
      </properties>
      <build>
        <plugins>

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

         <!-- Disabled because takari-lifecycle uses its own replacements for these plugins.
              We need to figure out if takari is attaching the sources and JavaDoc properly
              during the release.
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <configuration>
              <additionalparam>${javadoc.doclint}</additionalparam>
            </configuration>
            <executions>
              <execution>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </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> -->
        </plugins>
      </build>
    </profile>


    <profile>
      <id>before-release-commit</id>
      <build>
        <plugins>

          <plugin>
            <groupId>com.google.code.maven-replacer-plugin</groupId>
            <artifactId>replacer</artifactId>
            <inherited>false</inherited>
            <executions>
              <execution>
                <id>replace-release-version</id>
                <phase>generate-sources</phase>
                <goals>
                  <goal>replace</goal>
                </goals>
                <configuration>
                  <basedir>${basedir}</basedir>
                  <includes>
                    <include>README.adoc</include>
                    <include>srcdeps-maven-quickstarts/**/.mvn/extensions.xml</include>
                  </includes>
                  <replacements>
                    <replacement>
                      <token>&lt;version&gt;[^&lt;]*&lt;/version&gt;&lt;!-- @srcdeps.version@ --&gt;</token>
                      <value>&lt;version&gt;${project.version}&lt;/version&gt;&lt;!-- @srcdeps.version@ --&gt;</value>
                    </replacement>
                  </replacements>
                </configuration>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-scm-plugin</artifactId>
            <inherited>false</inherited>
            <executions>
              <execution>
                <id>add-changed-files-to-scm</id>
                <phase>generate-sources</phase>
                <goals>
                  <goal>add</goal>
                </goals>
                <configuration>
                  <basedir>${basedir}</basedir>
                  <includes>README.adoc,srcdeps-maven-quickstarts/**/.mvn/extensions.xml</includes>
                </configuration>
              </execution>
              <execution>
                <id>commit-changed-files-to-scm</id>
                <phase>generate-sources</phase>
                <goals>
                  <goal>checkin</goal>
                </goals>
                <configuration>
                  <message>[maven-release-plugin] Prepare release ${project.version}</message>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

  </profiles>
</project>
