Aug 22, 2012

Roo sample applications

Roo's sample applications are located under $ROO_HOME/samples

$ls  $ROO_HOME/samples
bikeshop.roo embedding.roo multimodule.roo vote.roo
clinic.roo expenses.roo pizzashop.roo wedding.roo


To generate a sample application (this generates the necessary scaffolding for the demo application)
$roo script $ROO_HOME/samples/pizzashop.roo
...
// Create a new project
project --topLevelPackage com.springsource.pizzashop --projectName pizzashop
...

// Setup JPA persistence using EclipseLink and H2
jpa setup --provider ECLIPSELINK --database H2_IN_MEMORY
...

// Create domain entities
entity jpa --class ~.domain.Base --activeRecord false --testAutomatically
...

// Define a repository layer for persistence
repository jpa --interface ~.repository.ToppingRepository --entity ~.domain.Topping
...

Script required 8.599 seconds to execute
$


To run this sample application:
$mvn jetty:run


Navigate to http://localhost:8080/pizzashop/ to see the app up and running