Maven Setup

Overview

This guide explains how to install maven .

Windows

Download Maven

You can't install maven if you don't have maven, right? So go out and get it. The latest version (as of 3-JAN-2008) is 2.0.8. It can be downloaded at no cost here .

Unzipping

Extract the files from the ZIP archive to C:\maven . If you don't have an extractor, try 7-zip .

Set JAVA_HOME

  • Right click on My Computer
  • Select Properties
  • Click on the Advanced tab
  • Click on the Environment Variables button
  • Highlight the PATH variable in the User variables for ??? area
  • Click on the New button
  • Add "JAVA_HOME" to Variable name:
  • Add the path to your JDK (example "C:\Program Files\Java\jdk1.5.0_10") to Variable value:
  • Click OK
  • Click OK
  • Click OK

Add maven to your PATH

  • Right click on My Computer
  • Select Properties
  • Click on the Advanced tab
  • Click on the Environment Variables button
  • Highlight the PATH variable in the User variables for ??? area
  • Click on the Edit button
  • Add "C:\maven\bin;" (without quotes) at the beginning of Variable value:
  • Click OK
  • Click OK
  • Click OK

Test it

  • Go to Start -> Run...
  • Type cmd
  • Click OK
  • Try running "mvn --version"
      C:\> mvn --version
      Maven version: 2.0.8
      Java version: 1.5.0_10
      OS name: "windows xp" version: "5.1" arch: "x86"

Installing the Oracle JDBC Driver

  • Get ojdbc14.jar from Oracle .
  • Run maven with the install target.
      C:\> mvn install:install-file -Dfile=ojdbc14.jar -DgroupId=com.oracle -DartifactId=ojdbc14 -Dversion=10.2.0.3 -Dpackaging=jar

Installing the Oracle XMLDB JAR

  • Get ojdbc14.jar from your database installation.
  • Run maven with the install target.
      C:\> mvn install:install-file -DgroupId=com.oracle -DartifactId=xdb -Dversion=10.2.0.3 -Dpackaging=jar -Dfile=xdb.jar