First Steps with Maven-2

Minimal configuration is required to get started with your Jetspeed custom build and Maven-2.

Copying in the settings.xml

The first step to building with Maven-2 is to setup your settings.xml. These settings hold all the information necessary to build with Maven-2 and Jetspeed.

There is a settings.xml.jetexpress file in the /JetspeedTraining/resources/maven/ directory. Copy this file into your Maven Home directory. The Maven home directory is located in a directory named .m2 found under your User Home directory. So for example that would be ~/.m2/ on Linux, or "%USERPROFILE%\.m2\" on Windows.

Linux: paste into Command Line:

Windows: paste into Command Line:

Editing the settings.xml

The settings file is primarily for configuring your application server and database. The settings are preconfigured for an embedded Derby database, so more changes are required if another database solution is to be used, covered later in this tutorial.

Edit the ~/.m2/settings.xml file.

Change the Jetspeed Server (Tomcat) Location

For the purpose of the training, lets all use the same Tomcat home, point it to the /JetspeedTraining/tomcat-express directory.


Change the Derby Database location

Next, lets change the location of our Derby database to the /JetspeedTraining/database/jetexpress directory.


Change the Repository Location

Change the Maven local repository location by modifying the <localRepository> element in the settings.xml file. If you are using the training material, we have pre-configured a Maven-2 repository /JetspeedTraining/maven/repository. Lets configure Maven to point there, edit the settings.xml:


Go on and save that file.