Java Reference
In-Depth Information
the Jetty-embedded servlet container, and finally, run any test code that is within the src/test/
java directory.
Here's a breakdown of what is contained within pom.xml :
<project
<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" >
<parent>
<parent>
<groupId>
<groupId> com.oreilly.rest.workbook </groupId>
</groupId>
<artifactId>
<artifactId> jaxrs-2.0-workbook-pom </artifactId>
</artifactId>
<version>
<version> 1.0 </version>
</version>
<relativePath>
<relativePath> ../pom.xml </relativePath>
</relativePath>
</parent>
</parent>
<modelVersion>
<modelVersion> 4.0.0 </modelVersion>
</modelVersion>
In this initial part of the pom.xml file, we're inheriting from a parent Maven module. This
parent module defines the default configuration for Maven plug-ins as well as the location of
remote Maven repositories to use to download library dependencies.
<groupId>
<groupId> com.oreilly.rest.workbook </groupId>
</groupId>
<artifactId>
<artifactId> jaxrs-2.0-workbook-ex03_1 </artifactId>
</artifactId>
artifactId is the name of the project. It is also used for the name of the WAR file that is
created by the build unless you override it with the finalName element in the build section
of the POM. This artifact belongs to a family of packages defined by the element groupId .
<version>
<version> 2.0 </version>
</version>
The version element identifies the version of the project we are creating. Generally, this
version text is appended to the artifactId when Maven creates the WAR file, but you'll see
later that we have overridden this with the finalName element.
< packaging > war </ packaging >
The packaging element tells Maven that this project is building a WAR file. Other values for
packaging could be jar , if we were creating a JAR, or ear for a Java EE enterprise archive.
<dependencies>
<dependencies>
<dependency>
<dependency>
<groupId>
<groupId> org.jboss.resteasy </groupId>
</groupId>
<artifactId>
<artifactId> resteasy-jaxrs </artifactId>
</artifactId>
<version>
<version> 3.0.5.Final </version>
</version>
</dependency>
</dependency>
<dependency>
<dependency>
Search WWH ::




Custom Search