O'Reilly logo

Harnessing Hibernate by James Elliott, Ryan Fowler, Timothy M. O'Brien

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

A Maven Project Object Model

This is it. This is the only configuration file you need to write for Maven to work. Every Maven project has a pom.xml file, and it describes the project’s attributes and dependencies, and contains any custom build configuration. Example 12-3 shows the pom.xml that made the previous build possible.

Example 12-3. Maven Project Object Model (POM)

<project xmlns="http://maven.apache.org/POM/4.0.0" 1
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
           http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.oreilly.hh</groupId> 2
  <artifactId>hib-dev-ch12</artifactId>
  <version>2.0-SNAPSHOT</version>
  <name>Harnessing Hibernate: Chapter Twelve: Maven</name>
  <packaging>jar</packaging> 3
  <dependencies> 4 <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>3.8.1</version> <scope>test</scope> </dependency> <dependency> <groupId>hsqldb</groupId> <artifactId>hsqldb</artifactId> <version>1.8.0.7</version> </dependency> <dependency> <groupId>org.hibernate</groupId> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required