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

  <groupId>org.quartz-scheduler</groupId>
  <artifactId>quartz-parent</artifactId>
  <version>2.3.2</version>
  <name>quartz-parent</name>
  <packaging>pom</packaging>
  
  <description>Quartz is a full-featured, open source job scheduling system that
    can be integrated with, or used along side virtually any J2EE or
    J2SE application</description>
  <url>http://www.quartz-scheduler.org</url>
  <organization>
    <name>Terracotta, Inc.</name>
    <url>http://www.terracotta.org</url>
  </organization>
  <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>  
  <scm>
    <connection>scm:git:git@github.com:quartz-scheduler/quartz.git</connection>
    <developerConnection>scm:git:git@github.com:quartz-scheduler/quartz.git</developerConnection>
    <tag />
    <url>https://github.com/quartz-scheduler/quartz</url>
  </scm>
  <issueManagement>
    <system>Terracotta's JIRA</system>
    <url>https://github.com/quartz-scheduler/quartz/issues</url>
  </issueManagement>  
  <developers>
    <developer>
    <id>jhouserizer</id>
    <name>James House</name>
    <email>jhouse@terracotta.org</email>
    <organization>Terracotta</organization>
    <organizationUrl>http://www.terracotta.org</organizationUrl>
    <roles>
      <role>Primary Developer</role>
    </roles>
    <timezone>-6</timezone>
    </developer>
  </developers>  
  <modules>
    <module>checkstyle</module>
    <module>quartz-core</module>
    <module>quartz-commonj</module>
    <module>quartz-jboss</module>
    <module>quartz-stubs</module>
    <module>quartz-oracle</module>
    <module>quartz-weblogic</module>    
    <module>quartz-jobs</module> 
    <module>quartz-plugins</module>
    <module>terracotta</module>
    <module>quartz</module>
  </modules>

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

    <skipDeploy>false</skipDeploy>
    <skipJavadoc>false</skipJavadoc>
    <skipCheckstyle>false</skipCheckstyle>
    
    <slf4j.version>1.7.7</slf4j.version>
    <c3p0.version>0.9.5.4</c3p0.version>
    <hikaricp.version>2.4.13</hikaricp.version>
    <log4j.version>1.2.16</log4j.version>
    <gmaven-plugin.version>1.4</gmaven-plugin.version>
    <checkstyle-suppressions-file>${user.dir}/checkstyle/src/main/resources/suppressions.xml</checkstyle-suppressions-file>
    <checkstyle-config-file>${user.dir}/checkstyle/src/main/resources/checkstyle.xml</checkstyle-config-file>
    <checkstyle-header-file>${user.dir}/checkstyle/src/main/resources/header.txt</checkstyle-header-file>

    <terracotta-snapshots-url>http://nexus.terracotta.eur.ad.sag/content/repositories/terracotta-snapshots</terracotta-snapshots-url>
    <terracotta-staging-url>http://nexus.terracotta.eur.ad.sag/content/repositories/terracotta-staging</terracotta-staging-url>
    <terracotta-releases-url>http://nexus.terracotta.eur.ad.sag/content/repositories/terracotta-releases</terracotta-releases-url>
  </properties>

  <build>
    <pluginManagement>                                                           
      <plugins>
        <!--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>org.apache.maven.plugins</groupId>
                    <artifactId>maven-antrun-plugin</artifactId>
                    <versionRange>[1.3,)</versionRange>
                    <goals>
                      <goal>run</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <versionRange>[2.1,)</versionRange>
                    <goals>
                      <goal>build-classpath</goal>
                      <goal>copy-dependencies</goal>
                      <goal>unpack-dependencies</goal>
                      <goal>unpack</goal>
                      <goal>copy</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>exec-maven-plugin</artifactId>
                    <versionRange>[1.2,)</versionRange>
                    <goals>
                      <goal>exec</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.codehaus.gmaven</groupId>
                    <artifactId>gmaven-plugin</artifactId>
                    <versionRange>[1.3,)</versionRange>
                    <goals>
                      <goal>execute</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-remote-resources-plugin</artifactId>
                    <versionRange>[1.1,)</versionRange>
                    <goals>
                      <goal>process</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>      
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>2.3.2</version>
          <configuration>
            <fork>true</fork>
            <meminitial>128</meminitial>
            <maxmem>512</maxmem>
          </configuration>
        </plugin>      
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>2.7</version>
          <configuration>
            <skip>${skipDeploy}</skip>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>2.1.2</version>
          <executions>
            <execution>
              <id>sources-jar</id>
              <goals>
                <goal>jar</goal>
              </goals>
            </execution>
          </executions>
        </plugin>               
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>findbugs-maven-plugin</artifactId>
          <version>2.4.0</version>
          <configuration>
            <findbugsXmlOutput>true</findbugsXmlOutput>
            <!--
            This seems to be an invalid option.
            <findbugsXmlWithMessages>true</findbugsXmlWithMessages>
            -->
            <xmlOutput>true</xmlOutput>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-checkstyle-plugin</artifactId>
          <version>2.9.1</version>
          <configuration>
            <encoding>UTF-8</encoding>          
            <configLocation>${checkstyle-config-file}</configLocation>
            <headerLocation>${checkstyle-header-file}</headerLocation>
            <suppressionsLocation>${checkstyle-suppressions-file}</suppressionsLocation>
            <consoleOutput>true</consoleOutput>
            <logViolationsToConsole>true</logViolationsToConsole>
            <failsOnError>true</failsOnError>
            <failOnViolation>true</failOnViolation>
            <includeTestSourceDirectory>false</includeTestSourceDirectory>
            <enableRulesSummary>true</enableRulesSummary>
            <linkXRef>false</linkXRef>
            <skip>${skipCheckstyle}</skip>
          </configuration>
          <executions>
            <execution>
              <id>run-checkstyle</id>
              <phase>verify</phase>
              <goals>
                <goal>checkstyle</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.4.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>3.1.1</version>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-deploy-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
      </plugin>      
    </plugins>
  </build>

  <profiles>

    <profile>
      <id>postgres-test</id>
      <dependencies>
        <dependency>
          <groupId>org.postgresql</groupId>
          <artifactId>postgresql</artifactId>
          <version>42.2.5.jre7</version>
        </dependency>
      </dependencies>
      <properties>
        <liquibase.url>jdbc:postgresql://localhost:5432/quartz</liquibase.url>
        <liquibase.username>quartz</liquibase.username>
        <liquibase.password>quartz123</liquibase.password>
      </properties>
      <build>
        <plugins>
          <plugin>
            <groupId>org.liquibase</groupId>
            <artifactId>liquibase-maven-plugin</artifactId>
            <version>3.6.3</version>
            <configuration>
              <changeLogFile>org/quartz/impl/jdbcjobstore/liquibase.quartz.init.xml</changeLogFile>
              <driver>org.postgresql.Driver</driver>
              <url>${liquibase.url}</url>
              <username>${liquibase.username}</username>
              <password>${liquibase.password}</password>
            </configuration>
            <executions>
              <execution>
                <phase>process-resources</phase>
                <goals>
                  <goal>update</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>dist</id>
      <modules>
        <module>distribution</module>
      </modules>
    </profile>
    <profile>
      <!-- Profile to sign artifacts with a PGP key (using GPG). -->
      <id>sign-artifacts</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.4</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
                <configuration>
                  <keyname>Terracotta Release Engineer</keyname>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>deploy-sonatype</id>
      <distributionManagement>
        <snapshotRepository>
          <id>quartz-snapshots</id>
          <name>Quartz snapshots at Sonatype Nexus</name>
          <url>http://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
          <id>quartz-staging</id>
          <name>Quartz release staging at Sonatype Nexus</name>
          <url>http://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
      </distributionManagement>
    </profile>
    <profile>
      <id>release</id>
      <distributionManagement>
        <repository>
          <id>terracotta-releases</id>
          <name>Terracotta Releases Repository</name>
          <url>${terracotta-releases-url}</url>
        </repository>
      </distributionManagement>
    </profile>
    <profile>
      <id>system-tests</id>
      <modules>
        <module>system-tests</module>
      </modules>
    </profile>
    <profile>
      <id>doclint-java8-disable</id>
      <activation>
        <jdk>[1.8,)</jdk>
      </activation>
      <properties>
        <additionalparam>-Xdoclint:none</additionalparam>
      </properties>
    </profile>
  </profiles>  

  <distributionManagement>
    <repository>
      <id>terracotta-staging</id>
      <name>Terracotta Staging Repository</name>
      <url>${terracotta-staging-url}</url>
    </repository>
    <snapshotRepository>
      <id>terracotta-snapshots</id>
      <uniqueVersion>false</uniqueVersion>
      <name>Terracotta Snapshots Repository</name>
      <url>${terracotta-snapshots-url}</url>
    </snapshotRepository>
  </distributionManagement>

  <repositories>
    <repository>
      <id>terracotta-snapshots</id>
      <url>http://www.terracotta.org/download/reflector/snapshots</url>
    </repository>  
    <repository>
      <id>terracotta-releases</id>
      <url>http://www.terracotta.org/download/reflector/releases</url>   
    </repository>   
  </repositories>

  <pluginRepositories>
    <pluginRepository>
      <id>terracotta-snapshots</id>
      <url>http://www.terracotta.org/download/reflector/snapshots</url>
    </pluginRepository>
    <pluginRepository>
      <id>terracotta-releases</id>
      <url>http://www.terracotta.org/download/reflector/releases</url>
    </pluginRepository>    
  </pluginRepositories>
</project>
