<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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>com.liveramp</groupId>
  <artifactId>jack</artifactId>
  <version>1.3.0</version>
  <packaging>pom</packaging>

  <name>Jack</name>
  <description>A set of scripts for generating fully functional Java database models from Ruby's ActiveRecord models and
    migrations.
  </description>
  <developers>
    <developer>
      <name>LiveRamp Engineering</name>
      <email>info@liveramp.com</email>
    </developer>
  </developers>

  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/LiveRamp/jack/issues</url>
  </issueManagement>

  <url>https://liveramp.com</url>

  <licenses>
    <license>
      <name>Apache 2</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <properties>
    <db.user>root</db.user>
    <db.pass>""</db.pass>
    <maven.compiler.source>1.8</maven.compiler.source>
  </properties>

  <scm>
    <connection>scm:git:git@github.com:LiveRamp/jack.git</connection>
    <url>scm:git:git@github.com:LiveRamp/jack.git</url>
    <developerConnection>scm:git:git@github.com:LiveRamp/jack.git</developerConnection>
    <tag>HEAD</tag>
  </scm>

  <modules>
    <module>jack-core</module>
    <module>jack-mysql</module>
    <module>jack-postgresql</module>
    <module>jack-redshift</module>
    <module>jack-store</module>
    <module>jack-test</module>
  </modules>

  <build>
    <plugins>

      <plugin>
        <artifactId>exec-maven-plugin</artifactId>
        <groupId>org.codehaus.mojo</groupId>
        <version>1.3.2</version>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.8.1</version>
        <configuration>
          <source>1.8</source>
          <target>1.8</target>
          <release>8</release>
        </configuration>
      </plugin>

    </plugins>
  </build>

  <profiles>
    <profile>
      <id>publish</id>
      <build>
        <plugins>
          <!-- Used to build a JAR containing the source code from this project -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>2.4</version>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

          <!-- Used to generate javadocs for this project -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>3.0.0</version>
            <executions>
              <execution>
                <!-- Disable javadoc linting until CD is setup, then you
                          can enable it if you'd like -->
                <configuration>
                  <doclint>none</doclint>
                </configuration>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

          <!-- Sign generated artifacts before publishing. -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.6</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <!-- The "sign" goal is one of the GPG plugin's
                  goals. It produces signature files for the
                   artifacts in this build. -->
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

          <!--
            Used to publish artifacts produced by this project to the Sonatype
            Nexus repository.
          -->
          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
            <version>1.6.8</version>
            <extensions>true</extensions>
            <configuration>
              <serverId>ossrh</serverId>
              <nexusUrl>https://oss.sonatype.org/</nexusUrl>
              <autoReleaseAfterClose>true</autoReleaseAfterClose>
            </configuration>
          </plugin>
        </plugins>
      </build>

      <!-- Specifies where to publish snapshots/releases on Sonatype -->
      <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>
    </profile>
  </profiles>
</project>
