Quartz 1.6.0 Maven2 pom.xml

March 28, 2008

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!

About these ads

6 Responses to “Quartz 1.6.0 Maven2 pom.xml”

  1. Chris Graham Says:

    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

  2. mykol Says:

    shouldn’t this be declared in the poms of those dependent on quartz instead?

  3. kassy Says:

    I CANNOT UNDERSTAND GREEK! hehehe! :) droppin you a note, Hi Ali! Happy Birthday!

  4. Albert Says:

    Thanks for the advice.

    I have found that this is also needed:

    commons-logging
    commons-logging
    1.1

  5. Alistair Says:

    Thanks, Albert!

    I guess I almost always use commons-logging now in my projects so I didn’t catch that dependency.


  6. [...] Here is a good tutorial show you about Quartz 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. [...]


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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: