Search

37.3. Dependency Management using Maven

download PDF
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>
<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>
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>
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.