SeamFramework.orgCommunity Documentation

Chapter 38. Dependencies

38.1. JDK Dependencies
38.1.1. Sun's JDK 6 Considerations
38.2. Project Dependencies
38.2.1. Core
38.2.2. RichFaces
38.2.3. Seam Mail
38.2.4. Seam PDF
38.2.5. Seam Microsoft® Excel®
38.2.6. JBoss Rules
38.2.7. JBPM
38.2.8. GWT
38.2.9. Spring
38.2.10. Groovy
38.3. Dependency Management using Maven

Seam does not work with JDK 1.4 and requires JDK 5 or above as it uses annotations and other JDK 5.0 features.. Seam has been thoroughly tested using Sun's JDKs. However there are no known issues specific to Seam with other JDK's.

This section both lists the compile-time and runtime dependencies for Seam. Where the type is listed as ear, the library should be included in the /lib directory of your application's ear file. Where the type is listed as war, the library should be placed in the /WEB-INF/lib directory of your application's war file. The scope of the dependency is either all, runtime or provided (by JBoss AS 4.2).

Up to date version information and complete dependency information is not included in the docs, but is provided in the /dependency-report.txt which is generated from the Maven POMs stored in /build. You can generate this file by running ant dependencyReport.

Maven offers support for transitive dependency management and can be used to manage the dependencies of your Seam project. You can use Maven Ant Tasks to integrate Maven into your Ant build, or can use Maven to build and deploy your project.

We aren't actually going to discuss how to use Maven here, but just run over some basic POMs you could use.

Released versions of Seam are available in http://repository.jboss.org/maven2 and nightly snapshots are available in http://snapshots.jboss.org/maven2.

All the Seam artifacts are available in Maven:


<dependency>
  <groupId>org.jboss.seam</groupId>
  <artifactId>jboss-seam</artifactId>
</dependency>

<dependency>
  <groupId>org.jboss.seam</groupId>
  <artifactId>jboss-seam-ui</artifactId>
</dependency>

<dependency>
  <groupId>org.jboss.seam</groupId>
  <artifactId>jboss-seam-pdf</artifactId>
</dependency>

<dependency>
  <groupId>org.jboss.seam</groupId>
  <artifactId>jboss-seam-remoting</artifactId>
</dependency>

<dependency>
  <groupId>org.jboss.seam</groupId>
  <artifactId>jboss-seam-ioc</artifactId>
</dependency>

<dependency>
  <groupId>org.jboss.seam</groupId>
  <artifactId>jboss-seam-ioc</artifactId>
</dependency>

This sample POM will give you Seam, JPA (provided by Hibernate) and Hibernate Validator:


<?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.jboss.seam.example/groupId>
  <artifactId>my-project</artifactId>
  <version>1.0</version>
  <name>My Seam Project</name>
  <packaging>jar</packaging>
  <repositories>
    <repository>
      <id>repository.jboss.org</id>
      <name>JBoss Repository</name>
      <url>http://repository.jboss.org/maven2</url>
    </repository>
  </repositories>

  <dependencies>

    <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-validator</artifactId>
      <version>3.0.0.GA</version>
    </dependency>

    <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-annotations</artifactId>
      <version>3.3.0.ga</version>
    </dependency>

    <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-entitymanager</artifactId>
      <version>3.3.1.ga</version>
    </dependency>

    <dependency>
      <groupId>org.jboss.seam</groupId>
      <artifactId>jboss-seam</artifactId>
      <version>2.0.0.GA</version>
    </dependency>
    
  </dependencies>

</project>