SeamFramework.orgCommunity Documentation

第42章 依存性

42.1. JDK の依存性
42.1.1. Sun の JDK 6 に関する注意点
42.2. プロジェクトの依存性
42.2.1. Core
42.2.2. RichFaces
42.2.3. Seam Mail
42.2.4. Seam PDF
42.2.5. Seam Microsoft® Excel®
42.2.6. Seam RSS サポート
42.2.7. JBoss Rules
42.2.8. JBPM
42.2.9. GWT
42.2.10. Spring
42.2.11. Groovy
42.3. 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 JDKs.

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 or 5.0).

最新のバージョン情報および完全な依存性情報は本ドキュメントには含まれていませんが、 /dependency-report.txt に記載されています。 これは /build に格納される Maven POM で生成されます。 ant dependencyReport を実行するとこのファイルを生成することができます。

Maven は推移的依存性の管理に対するサポートを提供するため Seam プロジェクトの依存性管理に使用することができます。 Maven Ant Tasks を使って Maven を Ant のビルドに統合したり、 Maven を使ってプロジェクトのビルドおよびデプロイを行うこともできます。

ここでは Maven の使い方については触れませんが利用できる基本的な POM をいくつか見てみることにします。

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

Seam の全アーティファクトは 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), Hibernate Validator and Hibernate Search:


<?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.1.0.GA</version>
    </dependency>

    <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-annotations</artifactId>
      <version>3.4.0.GA</version>
    </dependency>

    <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-entitymanager</artifactId>
      <version>3.4.0.GA</version>
    </dependency>
    
    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-search</artifactId>
        <version>3.1.1.GA</version>
    </dependency>

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

</project>