Quartz 1.6.0 Maven2 pom.xml

Here’s a quick post for those who a) use Maven 2 and b) need to use Quartz 1.6.0 in their projects.

See now Quartz 1.6.0 has (run-time) dependencies on JTA (if you’re using it stand-alone, outside of a J2EE container) and Commons Collections – unfortunately, the Quartz pom.xml doesn’t specify these as dependencies.

So here’s a pom.xml you can use to base your project’s POM off from.

<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>foo</groupId>
  <artifactId>quartz-project</artifactId>
  <version>1.0</version>
  <name>Quartz Project</name>

  <dependencies>
    <!--
      Quartz framework and dependencies
    -->
    <dependency>
      <groupId>opensymphony</groupId>
      <artifactId>quartz</artifactId>
      <version>1.6.0</version>
      <scope>compile</scope>
    </dependency>
    <!-- Quartz 1.6.0 depends on commons collections -->
    <dependency>
      <groupId>commons-collections</groupId>
      <artifactId>commons-collections</artifactId>
      <version>3.1</version>
      <scope>runtime</scope>
    </dependency>
    <!-- Quartz 1.6.0 requires JTA in non J2EE environments -->
    <dependency>
      <groupId>javax.transaction</groupId>
      <artifactId>jta</artifactId>
      <version>1.0.1b</version>
      <scope>runtime</scope>
    </dependency>
  </dependencies>

</project>

Enjoy!

Advertisements

6 thoughts on “Quartz 1.6.0 Maven2 pom.xml

  1. Er, looking at the full distro of quartz 1.6.0, it depends on commons-collections 3.1 not 3.2, it will simply not work with 3.2.

    -Chris

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s