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.

	 		
	  <org.apache.jetspeed.server.home>c:/JetspeedTraining/tomcat-express</org.apache.jetspeed.server.home>
     
	

Change the Derby Database location

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

	 		
     <org.apache.jetspeed.production.database.url>jdbc:derby:/JetspeedTraining/database/jetexpress</org.apache.jetspeed.production.database.url>	 
     
	

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:

	 		
	  <localRepository>c:/JetspeedTraining/maven/repository/</localRepository>
     
	

Go on and save that file.

Next