<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.alfasoftware</groupId>
  <artifactId>morf-parent</artifactId>
  <version>0.1.3</version>
  <packaging>pom</packaging>

  <name>Morf</name>
  <description>Morf is a library for cross-platform evolutionary relational database mechanics, database access and database imaging/cloning.</description>
  <url>https://github.com/alfasoftware/morf</url>

  <organization>
    <name>Alfa Financial Software Limited</name>
    <url>http://alfasystems.com</url>
  </organization>
  
  <modules>
    <module>morf-core</module>
    <module>morf-testsupport</module>
    <module>morf-excel</module>
    <module>morf-h2</module>
    <module>morf-mysql</module>
    <module>morf-nuodb</module>
    <module>morf-oracle</module>
    <module>morf-sqlserver</module>
    <module>morf-integration-test</module>
  </modules>
  
  <properties>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

    <!-- plugin versions -->
    <maven-compiler-plugin.version>3.6.1</maven-compiler-plugin.version>
    <maven-deploy-plugin.version>2.8.2</maven-deploy-plugin.version>
    <maven-jar-plugin.version>2.4</maven-jar-plugin.version>
    <maven-javadoc-plugin.version>2.9.1</maven-javadoc-plugin.version>
    <maven-release-plugin.version>2.5.3</maven-release-plugin.version>
    <maven-source-plugin.version>3.0.1</maven-source-plugin.version>
    <maven-surefire-plugin.version>2.13</maven-surefire-plugin.version>
    <findbugs-maven-plugin.version>3.0.4</findbugs-maven-plugin.version>
    <maven-checkstyle-plugin.version>2.17</maven-checkstyle-plugin.version>
    <checkstyle.version>8.12</checkstyle.version>

    <!-- dependency versions -->
    <commons-codec.version>1.9</commons-codec.version>
    <commons-io.version>2.0.1</commons-io.version>
    <commons-lang.version>2.6</commons-lang.version>
    <commons-logging.version>1.2</commons-logging.version>
    <guava.version>23.5-jre</guava.version>
    <guice.version>4.2.0</guice.version>
    <h2.version>1.4.196</h2.version>
    <hamcrest.version>1.3</hamcrest.version>
    <joda-time.version>2.1</joda-time.version>
    <junit.version>4.11</junit.version>
    <junitparams.version>1.0.4</junitparams.version>
    <jxl.version>2.6.12</jxl.version>
    <log4j.version>1.2.15</log4j.version>
    <mockito.version>1.9.0</mockito.version>
    <ognl.version>2.6.9</ognl.version>
    <serializer.version>2.7.1</serializer.version>
    <sonar-jacoco-listeners.version>3.8</sonar-jacoco-listeners.version>
    <slf4j.version>1.5.0</slf4j.version>
  </properties>
  
  <build>
    <pluginManagement>
      <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>${maven-compiler-plugin.version}</version>
          </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>${maven-deploy-plugin.version}</version>
          <configuration>
            <deployAtEnd>true</deployAtEnd>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>${maven-jar-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>${maven-surefire-plugin.version}</version>
          <configuration>
            <systemPropertyVariables>
              <log4j.configuration>file:${basedir}/../etc/log4j-maven.properties</log4j.configuration>
            </systemPropertyVariables>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>${maven-javadoc-plugin.version}</version>
          <configuration>
            <failOnError>true</failOnError>
            <quiet>true</quiet>
          </configuration>
          <executions>
            <execution>
              <id>attach-javadocs</id>
              <goals>
                <goal>jar</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>${maven-release-plugin.version}</version>
          <configuration>
            <tagNameFormat>@{project.version}</tagNameFormat>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>${maven-source-plugin.version}</version>
          <executions>
            <execution>
              <id>attach-sources</id>
              <goals>
                <goal>jar</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>findbugs-maven-plugin</artifactId>
          <version>${findbugs-maven-plugin.version}</version>
          <configuration>
            <excludeFilterFile>../etc/findbugs-exclude.xml</excludeFilterFile>
          </configuration>
          <executions>
            <execution>
              <id>sca-findbugs</id>
              <phase>validate</phase>
              <goals>
                <goal>check</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-checkstyle-plugin</artifactId>
          <version>${maven-checkstyle-plugin.version}</version>
           <dependencies>
            <dependency>
              <groupId>com.puppycrawl.tools</groupId>
              <artifactId>checkstyle</artifactId>
              <version>${checkstyle.version}</version>
            </dependency>
          </dependencies>
          <configuration>
            <configLocation>../etc/checkstyle.xml</configLocation>
            <encoding>UTF-8</encoding>
            <consoleOutput>true</consoleOutput>
            <failsOnError>true</failsOnError>
            <violationSeverity>warning</violationSeverity>
            <linkXRef>false</linkXRef>
          </configuration>
          <executions>
            <execution>
              <id>sca-checkstyle</id>
              <phase>validate</phase>
              <goals>
                <goal>check</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>
  
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.alfasoftware</groupId>
        <artifactId>morf-core</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.alfasoftware</groupId>
        <artifactId>morf-testsupport</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.alfasoftware</groupId>
        <artifactId>morf-excel</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.alfasoftware</groupId>
        <artifactId>morf-h2</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.alfasoftware</groupId>
        <artifactId>morf-mysql</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.alfasoftware</groupId>
        <artifactId>morf-nuodb</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.alfasoftware</groupId>
        <artifactId>morf-oracle</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.alfasoftware</groupId>
        <artifactId>morf-sqlserver</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>commons-codec</groupId>
        <artifactId>commons-codec</artifactId>
        <version>${commons-codec.version}</version>
      </dependency>
      <dependency>
        <groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>${commons-io.version}</version>
      </dependency>
      <dependency>
        <groupId>commons-lang</groupId>
        <artifactId>commons-lang</artifactId>
        <version>${commons-lang.version}</version>
      </dependency>
      <dependency>
        <groupId>commons-logging</groupId>
        <artifactId>commons-logging</artifactId>
        <version>${commons-logging.version}</version>
      </dependency>
      <dependency>
        <groupId>com.google.guava</groupId>
        <artifactId>guava</artifactId>
        <version>${guava.version}</version>
      </dependency>
      <dependency>
        <groupId>com.google.inject</groupId>
        <artifactId>guice</artifactId>
        <version>${guice.version}</version>
      </dependency>
      <dependency>
        <groupId>com.google.inject.extensions</groupId>
        <artifactId>guice-assistedinject</artifactId>
        <version>${guice.version}</version>
      </dependency>
      <dependency>
        <groupId>com.google.inject.extensions</groupId>
        <artifactId>guice-multibindings</artifactId>
        <version>${guice.version}</version>
      </dependency>
      <dependency>
        <groupId>com.h2database</groupId>
        <artifactId>h2</artifactId>
        <version>${h2.version}</version>
      </dependency>
      <dependency>
        <groupId>org.hamcrest</groupId>
        <artifactId>hamcrest-all</artifactId>
        <version>${hamcrest.version}</version>
      </dependency>
      <dependency>
        <groupId>joda-time</groupId>
        <artifactId>joda-time</artifactId>
        <version>${joda-time.version}</version>
      </dependency>
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>${junit.version}</version>
      </dependency>
      <dependency>
        <groupId>pl.pragmatists</groupId>
        <artifactId>JUnitParams</artifactId>
        <version>${junitparams.version}</version>
      </dependency>
      <dependency>
        <groupId>net.sourceforge.jexcelapi</groupId>
        <artifactId>jxl</artifactId>
        <version>${jxl.version}</version>
      </dependency>
      <dependency>
        <groupId>log4j</groupId>
        <artifactId>log4j</artifactId>
        <version>${log4j.version}</version>
        <exclusions>
          <exclusion>
            <groupId>com.sun.jmx</groupId>
            <artifactId>jmxri</artifactId>
          </exclusion>
          <exclusion>
            <groupId>com.sun.jdmk</groupId>
            <artifactId>jmxtools</artifactId>
          </exclusion>
          <exclusion>
            <groupId>javax.jms</groupId>
            <artifactId>jms</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-core</artifactId>
        <version>${mockito.version}</version>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>${slf4j.version}</version>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-simple</artifactId>
        <version>${slf4j.version}</version>
      </dependency>
      <dependency>
        <groupId>org.sonarsource.java</groupId>
        <artifactId>sonar-jacoco-listeners</artifactId>
        <version>${sonar-jacoco-listeners.version}</version>
      </dependency>
      <dependency>
        <groupId>xalan</groupId>
        <artifactId>serializer</artifactId>
        <version>${serializer.version}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <profiles>
    <profile>
      <id>coverage-per-test</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <properties>
                <property>
                  <name>listener</name>
                  <value>org.sonar.java.jacoco.JUnitListener</value>
                </property>
              </properties>
            </configuration>
          </plugin>
        </plugins>
      </build>

      <dependencies>
        <dependency>
          <groupId>org.sonarsource.java</groupId>
          <artifactId>sonar-jacoco-listeners</artifactId>
          <scope>test</scope>
        </dependency>
      </dependencies>
    </profile>
    
    <profile>
      <id>release</id>
      <properties>
        <gpg.executable>gpg2</gpg.executable>
      </properties>
      <build>
        <plugins>
          <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>
          <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>
                  <goal>sign</goal>
                </goals>
                <configuration>
                  <keyname>${gpg.keyname}</keyname>
                  <passphraseServerId>${gpg.keyname}</passphraseServerId>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <licenses>
    <license>
      <name>The Apache License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
    </license>
  </licenses>
  
  <developers>
    <developer>
      <name>Andrew Flegg</name>
      <email>andrew.flegg@alfasystems.com</email>
      <organization>Alfa Financial Software Limited</organization>
      <organizationUrl>http://alfasystems.com</organizationUrl>
    </developer>
    <developer>
      <name>Graham Crockford</name>
      <email>graham.crockford@alfasystems.com</email>
      <organization>Alfa Financial Software Limited</organization>
      <organizationUrl>http://alfasystems.com</organizationUrl>
    </developer>
    <developer>
      <name>Tim Gage</name>
      <email>tim.gage@alfasystems.com</email>
      <organization>Alfa Financial Software Limited</organization>
      <organizationUrl>http://alfasystems.com</organizationUrl>
    </developer>
    <developer>
      <name>Venushka Perera</name>
      <email>venushka.perera@alfasystems.com</email>
      <organization>Alfa Financial Software Limited</organization>
      <organizationUrl>http://alfasystems.com</organizationUrl>
    </developer>
    <developer>
      <name>Will Nicholson</name>
      <email>will.nicholson@alfasystems.com</email>
      <organization>Alfa Financial Software Limited</organization>
      <organizationUrl>http://alfasystems.com</organizationUrl>
    </developer>
  </developers>

  <issueManagement>
    <system>GitHub Issues</system>
    <url>https://github.com/alfasoftware/morf/issues</url>
  </issueManagement>
  
  <scm>
    <connection>scm:git:https://github.com/alfasoftware/morf.git</connection>
    <developerConnection>scm:git:git@github.com:alfasoftware/morf.git</developerConnection>
    <url>https://github.com/alfasoftware/morf</url>
    <tag>0.1.3</tag>
  </scm>
  
  <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>
</project>
