Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This guide explains how to get the Roller source code, build it with Maven, test it with Maven and run it via Maven, Jetty and Derby (recommended for development test purposes only). This build build applies to the current Roller trunk and, as of January 2010, the Roller trunk uses a Maven based build process. For information on building Roller 4.0 see BuildGuide40. Roller 5.1 requires JDK 1.7 or newer; Roller 5.0.x requires just JDK 1.6.

Eclipse users, you might wish to refer to this instead: Build and Run Roller 5 in Eclipse.

Get the Roller source code

There are two ways to get the source code, from the project's Subversion Git repository or from a source release. Here's how to get the Roller code directly from Subversionthe Git repo:

Code Block

   svngit coclone httpshttp://svngit-wip-us.apache.org/repos/asf/roller/trunk roller_trunk 
.git

Replace "http://" with "https://" in the above URLs if you are presently a Roller committer (i.e., have write access to Roller).:

If you are a GitHub user, you might find it easier to fork the Roller GitHub Repo: https://github.com/apache/roller.TBD: how to get and extract a source release

Build Roller Weblogger

Here's how to build Roller Weblogger (also runs the unit tests).

Code Block

   cd roller_trunk 
   mvn clean install 

Run Roller Weblogger for development testing

Here's how to run the Jetty servlet engine, Derby and Roller for development testing of Roller:

Code Block

   cd roller_trunk/weblogger-webapp
   mvn jetty:run-war

Then use your web browser to browse to http://localhost:8080/rollerImage Removed to test Roller. You will find the log files in roller_trunk/weblogger-webapp/target/work. You can adjust logging levels via the Roller properties override file at roller_trunk/weblogger-webapp/src/test/resources/roller-customjettyrun.properties. Note the blog information stored during each mvn jetty:run session will be lost once you stop Jetty (i.e., each mvn jetty:run starts with empty Roller database tables), however deploying Roller this way allows for hot (real-time) deployment of your JSP and CSS/JavaScript to the running application.

Build a Roller Weblogger release package

Here's how to build a full Roller Weblogger release including both binary and source releases.

Code Block

   cd roller_trunk/web-assembly
   mvn install 

You'll find the release files in roller_trunk/web-assembly/target. You can use the Roller Installation Guide for instructions on how to deploy the release files to Tomcat and other Java app servers.

Other resources

After running mvn clean install from from roller_trunk, navigate to its assembly-release subfolder and run mvn clean install again.

Other resources

Check the Roller Install guide for instructions on deploying Roller to Tomcat and other web servers. Unlike mvn jetty:run above, these deployments will persist data to non-temporary databases so you don't have to start from scratch with each run.

The Roller team is also starting to use Selenium to automate in-browser testings (using just Firefox presently), mvn clean install from the Roller it-selenium folder will activate the Roller Selenium tests.

Check this page's child pages for development within IntelliJ IDEA and Eclipse, as well as how to do code tracing in IDEA while running Roller via mvn jetty:run.Here's an excellent blog post from Harald Wellmann that explains how to setup Eclipse and m2eclipse plugin to build, test and run Roller: http://hwellmann.blogspot.com/2010/02/setting-up-eclipse-for-roller.html