Spring Roo is a next-generation rapid application development tool for Java developers. It focuses on higher productivity, stock-standard Java APIs, high usability, avoiding engineering trade-offs and facilitating easy Roo removal.
Java CSS FreeMarker Shell JavaScript HTML Other
Failed to load latest commit information.
addon-backup ROO-3744: Changing Spring Roo version to 2.0.0.BUILD-SNAPSHOT to be t… May 16, 2016
addon-cache ROO-3775: Add support for Spring Cache in generated projects Sep 7, 2016
addon-cloud ROO-3744: Changing Spring Roo version to 2.0.0.BUILD-SNAPSHOT to be t… May 16, 2016
addon-configurable ROO-3744: Changing Spring Roo version to 2.0.0.BUILD-SNAPSHOT to be t… May 16, 2016
addon-creator ROO-3800: Removing deprecated Spring Roo repository Oct 13, 2016
addon-dbre ROO-3744: Changing Spring Roo version to 2.0.0.BUILD-SNAPSHOT to be t… May 16, 2016
addon-dod ROO-3797 Fixed RepositoryJpaMetadata Oct 13, 2016
addon-dto ROO-3795: Refactorize audit addon. Moved from security addon to JPA a… Oct 13, 2016
addon-email ROO-3744: Changing Spring Roo version to 2.0.0.BUILD-SNAPSHOT to be t… May 16, 2016
addon-field ROO-3793 Use field annotation to manage relations Oct 10, 2016
addon-finder ROO-3787: Fix an error whith enum field types Oct 5, 2016
addon-javabean ROO-3797 Fixed RepositoryJpaMetadata Oct 13, 2016
addon-jdbc ROO-3744: Changing Spring Roo version to 2.0.0.BUILD-SNAPSHOT to be t… May 16, 2016
addon-jms ROO-3744: Changing Spring Roo version to 2.0.0.BUILD-SNAPSHOT to be t… May 16, 2016
addon-jpa Commenting unused JpaOperationsImpl tests Oct 20, 2016
addon-layers-repository-jpa Fixed problem with vargars definition Oct 20, 2016
addon-layers-service Organized imports Oct 20, 2016
addon-logging ROO-3744: Changing Spring Roo version to 2.0.0.BUILD-SNAPSHOT to be t… May 16, 2016
addon-oscommands ROO-3744: Changing Spring Roo version to 2.0.0.BUILD-SNAPSHOT to be t… May 16, 2016
addon-plural ROO-3744: Changing Spring Roo version to 2.0.0.BUILD-SNAPSHOT to be t… May 16, 2016
addon-propfiles ROO-3744: Changing Spring Roo version to 2.0.0.BUILD-SNAPSHOT to be t… May 16, 2016
addon-push-in Merge remote-tracking branch 'upstream/master' Oct 19, 2016
addon-security ROO-3795: Including CSRF configuration on views Oct 21, 2016
addon-tailor ROO-3744: Changing Spring Roo version to 2.0.0.BUILD-SNAPSHOT to be t… May 16, 2016
addon-test ROO-3744: Changing Spring Roo version to 2.0.0.BUILD-SNAPSHOT to be t… May 16, 2016
addon-web-mvc-controller ROO-3806 Added first version of command 'web mvc operation'. Oct 20, 2016
addon-web-mvc-embedded ROO-3744: Changing Spring Roo version to 2.0.0.BUILD-SNAPSHOT to be t… May 16, 2016
addon-web-mvc-i18n ROO-3814 Added moment-locale-es.js to solve problems of dates validation Oct 21, 2016
addon-web-mvc-jsp ROO-3744: Changing Spring Roo version to 2.0.0.BUILD-SNAPSHOT to be t… May 16, 2016
addon-web-mvc-thymeleaf ROO-3795: Including CSRF configuration on views Oct 21, 2016
addon-web-mvc-views ROO-3812: Added confirm modal. Added use of modals Oct 20, 2016
addon-web-selenium ROO-3744: Changing Spring Roo version to 2.0.0.BUILD-SNAPSHOT to be t… May 16, 2016
annotations ROO-3793 Use field annotation to manage relations Oct 10, 2016
devel-resources Including new folder under 'devel-resources' that will contain Spring… Jul 27, 2016
runtime Temporary deactivate some commands to avoid errors Oct 21, 2016
web-ui ROO-3744: Changing Spring Roo version to 2.0.0.BUILD-SNAPSHOT to be t… May 16, 2016
.gitignore ROO-2291: roo git addon is too verbose May 18, 2011
CODE_OF_CONDUCT.adoc Add Code of Conduct Feb 18, 2016
LICENSE.TXT ROO-2253: Change Spring Roo to Apache Software License version 2.0 (A… Jul 30, 2011
README.adoc Deleting gitter from README.adoc Oct 13, 2016
pom.xml ROO-3795: Including new command to add @Preathorize annotation Oct 17, 2016
rwc.sh ROO-4: Initial import of Spring Roo code. May 15, 2009


Spring Roo Build Status

Thanks for checking out Spring Roo from Git.

These instructions are aimed at experienced developers looking to develop Spring Roo itself. If you are new to Spring Roo or would simply like to try a release that has already been built, tested and distributed by the core development team, we recommend that you visit the Spring Roo Home Page and download an official release.

If you are looking for Reference Documentation you can get it here.

Spring Roo Logo

Code of Conduct

This project adheres to the Contributor Covenant code of conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to spring-code-of-conduct@pivotal.io.

Developer Instructions

These instructions detail how to get started with your freshly checked-out source tree. Follow next steps to develop Spring Roo yourself.

One-time setup instructions

We’ll assume you typed the following to checkout Roo (if not, adjust the paths in the following instructions accordingly):

cd ~
git clone git@github.com:spring-projects/spring-roo.git

In the instructions below, $ROO_HOME refers to the location where you checked out Roo (in this case it would be ROO_HOME="~/roo"). You do NOT need to add a $ROO_HOME variable. It is simply used in these docs.

Next double-check you meet the installation requirements:

  • To get started, make sure your system has as a minimum Java JDK 1.6 or newer installed. Java JDK 1.7 is recommended.

  • Maven 3.0.1+ properly installed and working with your Java version

  • Internet access so that Maven can download required dependencies

  • A Git command line client installed (required by Roo’s Maven build for inserting the current revision number into OSGi bundle manifests)

Next you need to setup an environment variable called MAVEN_OPTS. If you already have a MAVEN_OPTS, just check it has the memory sizes shown below (or greater).

If you’re following our checkout instructions above and are on a *nix machine, you can just type:

echo export MAVEN_OPTS=\"-Xmx1024m -XX:MaxPermSize=512m\" >> ~/.bashrc
source ~/.bashrc

Result: MAVEN_OPTS=-Xmx1024m -XX:MaxPermSize=512m)

You’re almost finished.

You just need to wrap up with a symbolic link (Windows users instead add $ROO_HOME/bootstrap to your path):

sudo ln -s $ROO_HOME/runtime/bootstrap/roo-dev /usr/bin/roo-dev
sudo chmod +x /usr/bin/roo-dev

GPG (PGP) Setup

Roo now uses GPG to automatically sign build outputs. If you haven’t installed GPG, download and install it:

Ensure you have a valid signature. Use "gpg --list-secret-keys".

You should see some output like this:

$ gpg --list-secret-keys
sec   1024D/00B5050F 2009-03-28
uid                  Ben Alex <ben.alex@acegi.com.au>
uid                  Ben Alex <ben.alex@springsource.com>
uid                  Ben Alex <balex@vmware.com>
ssb   4096g/2DB6833B 2009-03-28

If you don’t see the output, it means you first need to create a key.

It’s very easy to do this, just use "gpg --gen-key".

Then verify your newly-created key was indeed created: "gpg --list-secret-keys".

Next you need to publish your key to a public keyserver. Take a note of the "sec" key ID shown from the --list-secret-keys. In my case it’s key ID "00B5050F".

Push your public key to a keyserver via the command "gpg --keyserver hkp://pgp.mit.edu --send-keys 00B5050F" (of course changing the key ID at the end). Most public key servers share keys, so you don’t need to send your public key to multiple key servers.

Finally, every time you build you will be prompted for the password of your key.

You have several options:

  • Type the password in every time

  • Include a -Dgpg.passphrase=thephrase argument when calling "mvn"

    mvn clean install -Dgpg.passphrase=thephrase
  • Edit ~/.bashrc and add -Dgpg.passphrase=thephrase to MAVEN_OPTS

  • Edit your active Maven profile to include a "gpg.passphrase" property with readle value:

  • Use an encrypted "gpg.passphrase":

    1. Create a master password

      mvn --encrypt-master-password <password>
    2. Store this password in the ~/.m2/settings-security.xml. It should look like:

    3. Encrypt gpg passphrase:

      mvn --encrypt-password <passphrase>
    4. Store it into your settings.xml file in the server section. This will look like:


Of course the most secure options are to type the password every time and to encrypt the password. However, the most comfortable is to encrypt the password especially if you’re doing a lot of builds.

if you’re new to GPG: don’t lose your private key! Backup the secring.gpg file, as you’ll need it to ever revoke your key or sign a replacement key (the public key servers offer no way to revoke a key unless you can sign the revocation request).

Developing Roo

Spring Roo itself does not use AspectJ, it is a standard Maven project and therefore any standard IDE can be used for development. No extra plugins are needed.

The team use Eclipse or STS to develop Roo, just import the project as standard Maven project via File > Import > Maven > Existing Maven Projects into Workspace.

In theory you could use the m2eclipse plugin. The Roo team just tends to use the shell command mvn instead.

Code Style

Spring Roo project follows the Google Code Style convention.

The Maven Java Formatter plugin is included in the pom.xml to format the Java source files using the Eclipse Java Code Format definition .xml file included on the devel-resources folder.


Developers and contributors that uses STS or Eclipse should install the Eclipse Java Code Format definition .xml file via Window > Properties > Java > Code Style > Formatter > Import

Contributors must execute mvn clean install before sending the pull requests to be sure that Google Code Styles have been applied.

Running the command line tool

Roo uses OSGi and OSGi requires compiled JARs. Therefore as you make changes in Roo, you’d normally need to "mvn package" the relevant project(s), then copy the resulting JAR files to the OSGi container.

To simplify development and OSGi-related procedures, Roo’s Maven POMs have been carefully configured to emit manifests, SCR descriptors and dependencies.

These are mostly emitted when you use "mvn package".

To try Roo out, you should type the following:

mvn clean install
cd ~/new-project-directory

It’s important that you run roo-dev from a directory that you’d like to eventually contain a Roo-created project.

Don’t try to run roo-dev from your $ROO_HOME directory.

Notice we used "mvn install" rather than "mvn package". This is simply for convenience, as it will allow you to "cd" into any Roo module subdirectory and "mvn install". This saves considerable build time if changes are only being made in a single module.

Also take into account "mvn install" will perform some release related tasks, like generating the javadoc, the documentation from asciidoc, and generating the javadoc and source jars for each module. Those steps take a big amount of time to be performed, so to skip them just add the parameter "-DskipRelease".

Roo ships with a command line tool called roo-dev. This is also a Windows equivalent. It copies all relevant JARs from the Roo directories into $ROO_HOME/runtime/bootstrap/roo-dev/target/osgi. This directory represents a configured Roo OSGi instance.

roo-dev also launches the OSGi container, which is currently Apache Felix. It also activate the "development mode", which gives fuller exceptions, more file activity reporting, extra flash messages related to OSGi events etc.

Git Polices

When checking into Git, you must provide a commit message which begins with the relevant Roo Jira issue tracking number. The message should be in the form "ROO-xxx: Title of the Jira Issue". For example:

ROO-1234: Name of the task as stated in Jira

You are free to place whatever text you like after this prefix. The prefix ensures FishEye is able to correlate the commit with Jira. eg:

ROO-1234: Name of the task as stated in Jira - add extra file

You should not commit any IDE or Maven-generated files into Git.

Try to avoid "git pull", as it creates lots of commit messages like "Merge branch 'master' of git.springsource.org:roo/roo". You can avoid this with "git pull --rebase".

See the "Git Tips" below for advice.

Git Tips

Setup Git correctly before you do anything else:

git config --global user.name "Kanga Roo"
git config --global user.email joeys@marsupial.com

Perform the initial checkout with this:

git clone git@github.com:spring-projects/spring-roo.git

Let’s take the simple case where you just want to make a minor change against master. You don’t want a new branch etc, and you only want a single commit to eventually show up in "git log". The easiest way is to start your editing session with this:

git pull

That will give you the latest code. Go and edit files. Determine the changes with:

git status

You can use "git add -A" if you just want to add everything you see.

Next you need to make a commit. Do this via:

git commit -e

The -e will cause an editor to load, allowing you to edit the message. Every commit message should reflect the "Git Policies" above.

Now if nobody else has made any changes since your original "git pull", you can simply type this:

git push origin

If the result is '[ok]', you’re done.

If the result is '[rejected]', someone else beat you to it. The simplest way to workaround this is:

git pull --rebase

The --rebase option will essentially do a 'git pull', but then it will reapply your commits again as if they happened after the 'git pull'. This avoids verbose logs like "Merge branch 'master'".

If you’re doing something non-trivial, it’s best to create a branch. Learn more about this at http://sysmonblog.co.uk/misc/git_by_example/.


Roo is released on a regular basis by the Roo project team. To perform releases and make the associated announcements you require appropriate permissions to many systems (as listed below). As such these notes are intended to assist developers with such permissions complete releases.

Our release procedure may seem long, but that’s because it includes many steps related to final testing and staging releases with other teams.


  • GPG setup (probably already setup if you followed notes above)

  • Git push privileges (if you can commit, you have this)

  • s3cmd setup (so "s3cmd ls" lists spring-roo-repository.springsource.org)

  • ~/.m2/settings.xml for spring-roo-repository-release and spring-roo-repository-snapshot IDs with S3 username/password

  • @SpringRoo twitter account credentials

  • spring.io/projects/spring-roo editor privileges. Note you need editor privileges for source pages at https://github.com/spring-projects/spring-roo/tree/gh-pages

  • JIRA project administrator privileges

  • Close down your IDE before proceeding

Release Procedure

  1. Complete a thorough testing build and assembly ZIP:

    cd $ROO_HOME
    git pull --rebase
    cd $ROO_HOME/runtime/deployment-support
    ./roo-deploy-dist.sh -c next -n 4.5.6.RELEASE (use -v for logging)
    cd $ROO_HOME
    mvn clean install
    cd $ROO_HOME/runtime/deployment-support
    ./roo-deploy-dist.sh -c assembly -tv (use -t for extra tests)
  2. Verify the assembly ZIP ($ROO_HOME/target/roo-deploy/dist/*.zip) looks good:

    • Assembly ZIP unzips and is of a sensible size

    • Assembly ZIP runs correctly when installed on major platforms

    • Create Jira Task ticket "Release Spring Roo x.y.z.aaaaaa"

    • Run the "reference guide" command in the Roo shell, copy the resulting XML file into $ROO_HOME/deployment-support/src/site/docbook/reference, git commit and then git push (so the appendix is updated)

  3. Tag the release (update the key ID, Jira ID and tag ID):

    cd $ROO_HOME
    git tag -a -m "ROO-XXXX: Release Spring Roo 4.5.6.RELEASE" 4.5.6.RELEASE
  4. Build JARs:

     cd $ROO_HOME
     mvn clean package
  5. Build the reference guide and deploy to the static staging server. You must be connected to the VPN for deployment to work. Note that http://projects.spring.io/spring-roo/ is updated bi-hourly from staging:

    cd $ROO_HOME/deployment-support
    mvn clean site site:deploy
  6. Create the final assembly ZIP (must happen after site built). We run full tests here, even ensuring all the Maven artifacts used by user projects are available. This takes a lot of time, but it is very helpful for our users:

    cd $ROO_HOME/deployment-support
    ./roo-deploy-dist.sh -c assembly -Tv (-T means Maven tests with empty repo)
  7. Repeat the verification tests on the assembly ZIP (see above). See note below if coordinating a release with the STS team.

    Typically after this step you’ll send the tested assembly ZIP to the STS team for a concurrent release. Allow time for them to test the ZIP before starting step 8. This allows verification of STS embeddeding. Keep your ROO_HOME intact during this time, as you need the **/target and /.git directories for steps 8 and 9 to be completed.

  8. If the verifications pass, push the Git tag up to the server:

    cd $ROO_HOME
    git push --tags
  9. Deploy the JARs to Maven Central

    cd $ROO_HOME
    mvn clean deploy
  10. Deploy assembly ZIP (binaries) to the production download servers (it takes up to an hour for these to be made fully downloadable):

    cd $ROO_HOME/deployment-support
    ./roo-deploy-dist.sh -c deploy (use -dv for a dry-run and verbose logging)
  11. Increment the version number to the next BUILD-SNAPSHOT number:

    cd $ROO_HOME/deployment-support
    ./roo-deploy-dist.sh -c next -n 4.5.6.BUILD-SNAPSHOT (use -v for logging)
    cd $ROO_HOME
    mvn clean install eclipse:clean eclipse:eclipse
    cd ~/new-project-directory; roo-dev script clinic.roo; mvn test
    cd $ROO_HOME
    git diff
    git commit -a -m "ROO-XXXX: Update to next version"
    git push

If any problems are detected before step 8, simply fix, push and start from step 1 again. You have not deployed anything substantial (ie only the reference guide) until step 8, so some corrections and re-tagging can be performed without any difficulty. The critical requirement is to defer step 8 (and beyond) until you’re sure everything is fine.

Pre-notification testing

  • Visit http://projects.spring.io/spring-roo/, click "Download!"

  • Ensure it unzips OK and the sha1sum matches the downloaded .sha

  • rm -rf ~/.m2/repository/org/springframework/roo

  • Use "roo script clinic.roo" to build a new Roo project

  • Use "mvn clean test" to verify Roo’s annotation JAR downloads

Notifications and administration

Once the release is completed (ie all steps above) you’ll typically:


http://forum.springsource.org is now a read-only archive. All commenting, posting, registration services have been turned off.

If you have any question about Spring-roo project and its functionalities, you can check http://stackoverflow.com/questions/tagged/spring-roo

Thanks for your interest in Spring Roo!