此内容没有您所选择的语言版本。

37.3. Dependency Management using Maven


Maven supports transitive dependency management, and can be used to manage your project's dependencies. You can integrate Maven into your Ant build with Maven Ant Tasks, or use Maven to build and deploy your project.
This section will not tell you how to use Maven. Instead, we will show you some basic Project Object Models (POMs) you can use.
Released versions of Maven are available in http://repository.jboss.org/maven2 , and nightly snapshots are available in http://snapshots.jboss.org/maven2.
All Seam artifacts are available in Maven:
<dependency> 
  <groupId>org.jboss.seam</groupId> 
  <artifactId>jboss-seam</artifactId> 
</dependency>
Copy to Clipboard Toggle word wrap
<dependency> 
  <groupId>org.jboss.seam</groupId> 
  <artifactId>jboss-seam-ui</artifactId> 
</dependency>
Copy to Clipboard Toggle word wrap
<dependency> 
  <groupId>org.jboss.seam</groupId> 
  <artifactId>jboss-seam-pdf</artifactId> 
</dependency>
Copy to Clipboard Toggle word wrap
<dependency> 
  <groupId>org.jboss.seam</groupId> 
  <artifactId>jboss-seam-remoting</artifactId> 
</dependency>
Copy to Clipboard Toggle word wrap
<dependency> 
  <groupId>org.jboss.seam</groupId> 
  <artifactId>jboss-seam-ioc</artifactId> 
</dependency>
Copy to Clipboard Toggle word wrap
<dependency> 
  <groupId>org.jboss.seam</groupId> 
  <artifactId>jboss-seam-ioc</artifactId> 
</dependency>
Copy to Clipboard Toggle word wrap
The following sample POM will give you Seam, a 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>
Copy to Clipboard Toggle word wrap
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat