<?xml version="1.0"?>
<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.nocrala.tools.database.debbie</groupId>
  <artifactId>debbie-project</artifactId>
  <version>1.3.2</version>
  <packaging>pom</packaging>
    
  <name>Debbie Project</name>

  <description>
    Debbie automates the build, clean and rebuild operations on a sandbox database, from
    the SQL source code in the repository.
  </description>

  <url>https://github.com/justtheimpaler/debbie</url>

  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <developers>
    <developer>
      <id>valarcon</id>
      <name>Vladimir Alarcon</name>
      <email>vladimiralarcon@yahoo.com</email>
      <organization>Empirical Inc.</organization>
      <organizationUrl />
      <roles>
        <role>Programmer</role>
      </roles>
      <timezone>America/New York</timezone>
    </developer>
  </developers>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
  </properties>

  <scm>
    <developerConnection>scm:git:git@github.com:justtheimpaler/debbie.git</developerConnection>
    <url>https://github.com/justtheimpaler/debbie</url>
    <tag>1.3.2</tag>
  </scm>

  <modules>
    <module>debbie</module>
    <module>debbie-ant-plugin</module>
    <module>debbie-maven-plugin</module>
  </modules>
  
  <distributionManagement>
    <snapshotRepository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
    <repository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
    </repository>
  </distributionManagement>

  <build>

    <plugins>
  
      <!-- Set the release tag to the version number only, and single versioning -->
 
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>3.0.0-M1</version><!--$NO-MVN-MAN-VER$-->
        <configuration>
          <tagNameFormat>@{project.version}</tagNameFormat>
          <autoVersionSubmodules>true</autoVersionSubmodules>
        </configuration>
      </plugin>      

      <!-- Replaces "deploy" step with full Nexus Deploy + Close + Release on Maven Central -->

      <plugin>
        <groupId>org.sonatype.plugins</groupId>
        <artifactId>nexus-staging-maven-plugin</artifactId>
        <version>1.6.7</version>
        <extensions>true</extensions>
        <configuration>
          <serverId>ossrh</serverId>
          <nexusUrl>https://oss.sonatype.org/</nexusUrl>
          <autoReleaseAfterClose>true</autoReleaseAfterClose>
        </configuration>
      </plugin>

    </plugins>

  </build>

  <profiles>

    <profile>
      <id>release</id>
      <build>

        <plugins>

          <!-- Produce sources package - For Maven Central publishing -->

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>3.1.0</version>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
 
          <!-- Produce the Javadocs package - For Maven Central publishing -->

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>3.1.0</version>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

          <!-- Sign components using GPG -->

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

        </plugins>

      </build>
    </profile>

  </profiles>

</project>

