gvNIX

Add-on notes for Spring Roo 1.1.0.M1

Copyright: Conselleria d'Infraestructures i Transport - Generalitat Valenciana
Author: DiSiD Technologies, S.L.
License:This work is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.
Revision: 2956
Date: 2010-04-09

Contents

Introduction

Guide to apply the patch at http://jira.springframework.org/browse/ROO-788 and install new add-ons in roo shell 1.1.0.M1

Requirements

Apply the patch

Build roo-dev

Change to dir $ROO_HOME/trunk, build and install Roo-dev:

Bash shell:

  mvn clean install

Note

To know how to setup roo-dev read $ROO_HOME/trunk/readme.txt

Create and install the new add-on

  1. Create the add-on directory and run the roo shell:

    Bash shell:
    
      mkdir addon-test
      cd addon-test
      roo-dev
    
  2. Create the add-on project and pack the add-on:

    Roo shell:
    
      project --topLevelPackage org.organization.roo.addon --template ROO_ADDON_SIMPLE
      perform assembly
    

    You will get an output similar to:

    ...
    [INFO] [assembly:assembly]
    [INFO] Reading assembly descriptor: src/main/assembly/assembly.xml
    [INFO] Building zip: /tmp/addon-test/target/org.organization.roo.addon-0.1.0-SNAPSHOT.zip
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD SUCCESSFUL
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 22 seconds
    [INFO] Finished at: Tue Apr 13 08:46:58 CEST 2010
    [INFO] Final Memory: 43M/364M
    [INFO] ------------------------------------------------------------------------
    

    Important

    Copy the add-on ZIP file name (i.e. org.organization.roo.addon-0.1.0-SNAPSHOT) , you will need it to install the add-on (see next step)

  3. Install the add-on

    Install the jar file that was created using perform assembly command. Following the example above:

    Roo shell:
    
      osgi install --url file:./target/org.organization.roo.addon-0.1.0-SNAPSHOT.jar
    

    You will get an output similar to:

    Bundle ID: 55
    
  4. The OSGI add-on has been installed. Check it:

    Roo shell:
    
      osgi ps
    

    You will get an output similar to:

    [  55] [Installed   ] [    1] org.organization.roo.addon (0.1.0.SNAPSHOT)
    
  5. Now you have to active the add-on:

    Roo shell:
    
      felix shell "start 55"
    

    Note

    You have to use the BUNDLE_ID you get on installation step (see above)

  6. Check the activation:

    Roo shell:
    
      osgi ps
    

    You will get an output similar to:

    [  55] [Active   ] [    1] org.organization.roo.addon (0.1.0.SNAPSHOT)
    

Use the new add-on

The add-on has been installed and activated, try the welcome commands:

Roo shell:

  welcome property USERNAME

Uninstall the add-on

To uninstall the add-on:

Roo shell:

  felix shell "uninstall 55"

Note

You have to use the BUNDLE_ID you get on installation step (see above)

To deactivate the add-on:

Roo shell:

  felix shell "stop 55"

Note

You have to use the BUNDLE_ID you get on installation step (see above)

References