<?xml version="1.0" encoding="UTF-8"?>
<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.1.7</version>
  <packaging>pom</packaging>
  <name>Quartz Parent POM</name>

  <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://quartz-scheduler.org/</url>

  <scm>
    <connection>scm:svn:http://svn.terracotta.org/svn/quartz</connection>
    <developerConnection>scm:svn:https://svn.terracotta.org/repo/quartz</developerConnection>
    <url>http://svn.terracotta.org/svn/quartz</url>
  </scm>

  <developers>
    <developer>
      <id>jhouse</id>
      <name>James House</name>
      <email>jhouse@terracotta.org</email>
      <organization>Terracotta</organization>
      <organizationUrl>http://terracotta.org</organizationUrl>
      <roles>
        <role>Primary Developer</role>
      </roles>
      <timezone>-6</timezone>
    </developer>
    <developer>
      <id>jvoegele</id>
      <name>Jason Voegele</name>
      <email>jvoegele@terracotta.org</email>
      <organization>Terracotta</organization>
      <organizationUrl>http://terracotta.org</organizationUrl>
      <roles>
        <role>Build Engineer</role>
        <role>Release Engineer</role>
      </roles>
      <timezone>-5</timezone>
    </developer>
  </developers>

  <licenses>
    <license>
      <name>Apache 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0</url>
    </license>
  </licenses>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.quartz-scheduler</groupId>
        <artifactId>quartz</artifactId>
        <version>${project.version}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <modules>
    <module>quartz</module>
    <module>quartz-jboss</module>
    <module>quartz-stubs</module>  
    <module>quartz-oracle</module>
    <module>quartz-weblogic</module>
    <module>quartz-commonj</module>
    <module>quartz-backward-compat</module>
    <module>quartz-all</module>
    <module>examples</module>
  </modules>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>2.0.2</version>
          <configuration>
            <source>1.5</source>
            <target>1.5</target>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>2.1.2</version>
          <executions>
            <execution>
              <id>attach-sources</id>
              <phase>package</phase>
              <goals>
                <goal>jar</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.10</version>
          <configuration>
            <forkMode>always</forkMode>
            <systemProperties>
              <property>
                <!-- skip update check in tests -->
                <name>org.terracotta.quartz.skipUpdateCheck</name>
                <value>true</value>
              </property>
            </systemProperties>
          </configuration>
        </plugin>        
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>findbugs-maven-plugin</artifactId>
          <version>2.3.2</version>
          <configuration>
            <findbugsXmlOutput>true</findbugsXmlOutput>
            <findbugsXmlWithMessages>true</findbugsXmlWithMessages>
            <xmlOutput>true</xmlOutput>
            <excludeFilterFile>${basedir}/../src/findbugs/excludeFilter.xml</excludeFilterFile>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-pmd-plugin</artifactId>
          <version>2.5</version>
          <configuration>
            <aggregate>true</aggregate>
            <targetJdk>1.5</targetJdk>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>    
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>findbugs-maven-plugin</artifactId>
        <configuration>
          <skip>true</skip>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-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>
        <version>2.3</version>
        <executions>
          <execution>
            <phase>verify</phase>
            <goals>
              <goal>checkstyle</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <skip>true</skip>
          <configLocation>${basedir}/../src/checkstyle/checkstyle_checks.xml</configLocation>
          <suppressionsLocation>${basedir}/../src/checkstyle/suppressions.xml</suppressionsLocation>
          <headerLocation>${basedir}/../src/checkstyle/src-header.txt</headerLocation>
          <enableRSS>false</enableRSS>
          <linkXRef>false</linkXRef>
          <consoleOutput>true</consoleOutput>
          <failsOnError>true</failsOnError>
          <failOnViolation>true</failOnViolation>
          <includeTestSourceDirectory>false</includeTestSourceDirectory>
          <enableRulesSummary>true</enableRulesSummary>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>tc-publish</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-scm-plugin</artifactId>
            <version>1.4</version>
            <executions>
              <execution>
                <id>tim-quartz-ee-export</id>
                <phase>prepare-package</phase>
                <goals>
                  <goal>export</goal>
                </goals>
                <configuration>
                  <connectionUrl>scm:svn:https://svn.terracotta.org/repo/forge/enterprise/tim-quartz-ee/branches/tc-3.6/tim-quartz-2.0-ee/src/main/java</connectionUrl>
                  <exportDirectory>${project.build.directory}/tim-quartz-2.0-ee-src</exportDirectory>
                  <username>${svn.username}</username>
                  <password>${svn.password}</password>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <!--
        Profile used to prepare the distribution, including generating JavaDocs and invoking the assembly
        plugin to create the distribution archive files.  To create the distribution, invoke the package phase
        and the assembly:assembly plugin goal with this profile enabled, i.e.:

          mvn -Pprepare-distribution package assembly:assembly
       -->
      <id>prepare-distribution</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>2.7</version>
            <executions>
              <execution>
                <id>javadoc-jars</id>
                <phase>package</phase>
                <goals>
                  <goal>jar</goal>
                </goals>
                <configuration>
                  <excludePackageNames>org.quartz.examples</excludePackageNames>
                  <bottom><![CDATA[Copyright 2001-{currentYear}, <a href="http://www.terracotta.org">Terracotta, Inc.<a>]]></bottom>
                  <doctitle>Quartz Enterprise Job Scheduler ${project.version} API</doctitle>
                </configuration>
              </execution>
              <execution>
                <id>make-javadoc</id>
                <phase>package</phase>
                <goals>
                  <goal>aggregate-jar</goal>
                </goals>
                <configuration>
                  <outputDirectory>${project.build.directory}/apidocs</outputDirectory>
                  <bottom><![CDATA[Copyright 2001-{currentYear}, <a href="http://www.terracotta.org">Terracotta, Inc.<a>]]></bottom>
                  <doctitle>Quartz Enterprise Job Scheduler ${project.version} API</doctitle>
                  <sourcepath>${project.build.directory}/tim-quartz-2.0-ee-src:
                              ${basedir}/quartz/src/main/java:
                              ${basedir}/quartz-jboss/src/main/java:
                              ${basedir}/quartz-oracle/src/main/java:
                              ${basedir}/quartz-weblogic/src/main/java
                  </sourcepath>
                  <excludePackageNames>org.quartz.examples:*.spi:org.terracotta.quartz</excludePackageNames>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-assembly-plugin</artifactId>
            <version>2.2.2</version>
            <configuration>
              <finalName>quartz-${project.version}</finalName>
              <appendAssemblyId>false</appendAssemblyId>
              <descriptors>
                <descriptor>src/main/assembly/dist.xml</descriptor>
              </descriptors>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </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.1</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>
      <!-- Profile to launch integration tests. Can take a while to complete... -->
      <id>integration-tests</id>
      <activation>
        <property>
          <name>ITs</name>
          <value>true</value>
        </property>
      </activation>
      <modules>
        <module>quartz-integration-tests</module>
      </modules>
    </profile>


  </profiles>

  <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>

</project>
