Introduction
It’s a great rapid prototyping tool because prototypes don’t need to be scrapped to proceed with fleshing out the application if a prototype proves itself.
Bring
best practices, Rails-like scaffolding, an interactive shell, no additional
run-time dependencies, and a big productivity boost while not locking you into
yet another framework. You can re-use your existing Spring/JPA/Hibernate
knowledge, while getting the productivity gains from Roo.
Audience:
The audience for this document is:
·
Application Designer
·
Application Developer
Spring ROO Commands
You can create
entities either via Roo or your IDE.
Using the Roo
shell is fast and easy, especially thanks to the TAB completion.
Start by typing
'ent' and then hitting TAB twice.
Enter the
--class in the form '~.domain.MyEntityClassName'
In Roo, '~'
means the --topLevelPackage you specified via 'create project'.
After specify a
--class argument, press SPACE then TAB. Note nothing appears.
Because nothing
appears, it means you've entered all mandatory arguments.
However,
optional arguments do exist for this command (and most others in Roo).
To see the
optional arguments, type '--' and then hit TAB. Mostly you won't need any
optional arguments, but let's select the --testAutomatically option
And hit ENTER.
You can always use this approach to view optional arguments.
Some of the Spring ROO Commands
which will be useful to create and manage project.
1.
Controller Command
i. controller all
Scaffold
controllers for all project entities without an existing controller -
deprecated, use 'web mvc setup' + 'web mvc all' instead
Controller
all --package
--package
The package in which new
controllers will be placed; no default value (mandatory)
Create
a new scaffold Controller (i.e. where we maintain CRUD automatically) -
deprecated, use 'web mvc scaffold' instead
controller
scaffold --class
--class
The path and name of the
controller object to be created; no default value (mandatory)
--entity
The name of the entity
object which the controller exposes to the web tier; default if option not
present: '*'
--path
The base path under
which the controller listens for RESTful requests (defaults to the simple name
of the form backing object); no default value
--disallowedOperations
A comma separated list
of operations (only create, update, delete allowed) that should not be
generated in the controller; no default value
Create
a new manual Controller (i.e. where you write the methods) - deprecated, use
'web mvc controller' instead
controller
class --class
--class
The path and name of the
controller object to be created; no default value (mandatory)
--preferredMapping
Indicates a specific request
mapping path for this controller (e.g. /foo/); no default value
2.
Jpa Commands
Jpa
Commands are contained in org.springframework.roo.addon.jpa.JpaCommands.
Shows database configuration
details
database properties list
This command does not accept any
options.
For example : database properties list
Removes a particular database
property
database properties remove --key
--key
The property key that should be
removed; no default value (mandatory).
Changes a particular database
property
database properties set --key --value
--key
The property key that should be
changed; no default value (mandatory)
--value
The new value for this property
key; no default value (mandatory)
For example : database properties set --key database.url
--value jdbc:hsqldb:/home/balex/our-wedding
|
|
Managed
SRC_MAIN_RESOURCES/META-INF/spring/database.properties
|
Creates a new Java class source
file with the JPA @Embeddable annotation in SRC_MAIN_JAVA
embeddable --class
--class
The name of the class to create;
no default value (mandatory)
--serializable
Whether the generated class should
implement java.io.Serializable; default if option present: 'true'; default if
option not present: 'false'
--permitReservedWords
Indicates whether reserved words
are ignored by Roo; default if option present: 'true'; default if option not
present: 'false'
V. entity jpa
Creates a new JPA persistent
entity in SRC_MAIN_JAVA.
entity jpa --class
--class
Name of the entity to create; no
default value (mandatory)
--extends
The superclass (defaults to
java.lang.Object); default if option not present: 'java.lang.Object'
--abstract
Whether the generated class should
be marked as abstract; default if option present: 'true'; default if option not
present: 'false'
--testAutomatically
Create automatic integration tests
for this entity; default if option present: 'true'; default if option not
present: 'false'
--table
The JPA table name to use for this
entity; no default value
--schema
The JPA table schema name to use
for this entity; no default value
--catalog
The JPA table catalog name to use
for this entity; no default value
--identifierField
The JPA identifier field name to
use for this entity; no default value
--identifierColumn
The JPA identifier field column to
use for this entity; no default value
--identifierType
The data type that will be used
for the JPA identifier field (defaults to java.lang.Long); default:
'java.lang.Long'
--versionField
The JPA version field name to use
for this entity; no default value
--versionColumn
The JPA version field column to
use for this entity; no default value
--versionType
The data type that will be used
for the JPA version field (defaults to java.lang.Integer); default if option
not present: 'java.lang.Integer'
--inheritanceType
The JPA @Inheritance value (apply
to base class); no default value
--mappedSuperclass
Apply @MappedSuperclass for this
entity; default if option present: 'true'; default if option not present:
'false'
--equals
Whether the generated class should
implement equals and hashCode methods; default if option present: 'true';
default if option not present: 'false'
--serializable
Whether the generated class should
implement java.io.Serializable; default if option present: 'true'; default if
option not present: 'false'
--persistenceUnit
The persistence unit name to be
used in the persistence.xml file; no default value
--transactionManager
The transaction manager name; no
default value
--permitReservedWords
Indicates whether reserved words
are ignored by Roo; default if option present: 'true'; default if option not
present: 'false'
--entityName
The name used to refer to the
entity in queries; no default value
--sequenceName
The name of the sequence for
incrementing sequence-driven primary keys; no default value
--activeRecord
Generate CRUD active record
methods for this entity; default: 'true'
For
example : entity jpa
--class ~.domain.Topping –testAutomatically
VI. jpa setup
Install or updates a JPA persistence provider in your project
jpa setup --provider --database
--provider
The persistence provider to
support; no default value (mandatory)
--database
The database to support; no
default value (mandatory)
--applicationId
The Google App Engine application
identifier to use; default if option not present: 'the project's name'
--jndiDataSource
The JNDI datasource to use; no
default value
--hostName
The host name to use; no default
value
--databaseName
The database name to use; no default
value
--userName
The username to use; no default
value
--password
The password to use; no default
value
--transactionManager
The transaction manager name; no
default value
--persistenceUnit
The persistence unit name to be
used in the persistence.xml file; no default value
For example : jpa setup --provider HIBERNATE
--database HYPERSONIC_IN_MEMORY
Install or updates a JPA
persistence provider in your project - deprecated, use 'jpa setup' instead
persistence setup --provider --database
--provider
The persistence provider to
support; no default value (mandatory)
--database
The database to support; no
default value (mandatory)
--applicationId
The Google App Engine application
identifier to use; default if option not present: 'the project's name'
--jndiDataSource
The JNDI datasource to use; no
default value
--hostName
The host name to use; no default
value
--databaseName
The database name to use; no
default value
--userName
The username to use; no default
value
--password
The password to use; no default
value
--transactionManager
The transaction manager name; no
default value
--persistenceUnit
The persistence unit name to be
used in the persistence.xml file; no default value
For
example : persistence setup –provider DATANUCLEUS –database
GOOGLE_APP_ENGINE
3. Field Commands
Field Commands are contained in
org.springframework.roo.classpath.operations.FieldCommands.
i.field boolean
Adds
a private boolean field to an existing Java source file.
field boolean --fieldName
--fieldName
The name of the field to add; no
default value (mandatory)
--class
The name of the class to receive
this field; default if option not present: '*'
--notNull
Whether this value cannot be null;
default if option present: 'true'; default if option not present: 'false'
--nullRequired
Whether this value must be null;
default if option present: 'true'; default if option not present: 'false'
--assertFalse
Whether this value must assert
false; default if option present: 'true'; default if option not present:
'false'
--assertTrue
Whether this value must assert
true; default if option present: 'true'; default if option not present: 'false'
--column
The JPA @Column name; no default
value
--value
Inserts an optional Spring @Value annotation
with the given content; no default value
--comment
An optional comment for JavaDocs;
no default value
--primitive
Indicates to use a primitive type;
default if option present: 'true'; default if option not present: 'false'
--transient
Indicates to mark the field as
transient; default if option present: 'true'; default if option not present:
'false'
--permitReservedWords
Indicates whether reserved words
are ignored by Roo; default if option present: 'true'; default if option not
present: 'false'
For example : field boolean --fieldName
enabled --notNull true
ii. field date
Adds a private date field to an existing Java
source file.
field date --fieldName --type
--fieldName
The name of the field to add; no
default value (mandatory)
--type
The Java type of the entity; no
default value (mandatory)
--persistenceType
The type of persistent storage to
be used; no default value
--class
The name of the class to receive
this field; default if option not present: '*'
--notNull
Whether this value cannot be null;
default if option present: 'true'; default if option not present: 'false'
--nullRequired
Whether this value must be null;
default if option present: 'true'; default if option not present: 'false'
--future
Whether this value must be in the
future; default if option present: 'true'; default if option not present:
'false'
--past
Whether this value must be in the
past; default if option present: 'true'; default if option not present: 'false'
--column
The JPA @Column name; no default
value
--comment
An optional comment for JavaDocs;
no default value
--value
Inserts an optional Spring @Value
annotation with the given content; no default value
--transient
Indicates to mark the field as
transient; default if option present: 'true'; default if option not present:
'false'
--permitReservedWords
Indicates whether reserved words
are ignored by Roo; default if option present: 'true'; default if option not
present: 'false'
--dateFormat
Indicates the style of the date
format (ignored if dateTimeFormatPattern is specified); default: 'MEDIUM'
--timeFormat
Indicates the style of the time
format (ignored if dateTimeFormatPattern is specified); default: 'NONE'
--dateTimeFormatPattern
Indicates a DateTime format
pattern such as yyyy-MM-dd hh:mm:ss a; no default value
For example : field date --fieldName
deliveryDate --type java.util.Date
iii.field email template
Inserts a MailTemplate
field into an existing type.
field email template
--fieldName
The name of the field to add;
default: 'mailTemplate'
--class
The name of the class to receive
this field; default if option not present: '*'
--async
Indicates if the injected method
should be executed asynchronously; default if option present: 'true'; default
if option not present: 'false'
For example :field email template --class
~.web.TalkController
iV.field embedded
Adds a private @Embedded field to an existing
Java source file.
field embedded --fieldName --type
--fieldName
The name of the field to add; no
default value (mandatory)
--type
The Java type of the @Embeddable
class; no default value (mandatory)
--class
The name of the @Entity class to
receive this field; default if option not present: '*'
--permitReservedWords
Indicates whether reserved words
are ignored by Roo; default if option present: 'true'; default if option not
present: 'false'
For example : field embedded --fieldName
preferences --type com.example.domain.UserPreference --class
com.example.domain.User
V. field enum
Adds a private enum field to an existing Java
source file.
field enum --fieldName --type
--fieldName
The name of the field to add; no
default value (mandatory)
--type
The enum type of this field; no
default value (mandatory)
--class
The name of the class to receive
this field; default if option not present: '*'
--column
The JPA @Column name; no default
value
--notNull
Whether this value cannot be null;
default if option present: 'true'; default if option not present: 'false'
--nullRequired
Whether this value must be null;
default if option present: 'true'; default if option not present: 'false'
--enumType
The fetch semantics at a JPA
level; no default value
--comment
An optional comment for JavaDocs;
no default value
--transient
Indicates to mark the field as
transient; default if option present: 'true'; default if option not present:
'false'
--permitReservedWords
Indicates whether reserved words
are ignored by Roo; default if option present: 'true'; default if option not
present: 'false'
For example : field enum --fieldName color
--type ~.domain.Colors
VI.field file
Adds a byte array field for storing uploaded
file contents (JSF-scaffolded UIs only).
field file --fieldName --contentType
--fieldName
The name of the file upload field
to add; no default value (mandatory)
--class
The name of the class to receive
this field; default if option not present: '*'
--contentType
The content type of the file; no
default value (mandatory)
--autoUpload
Whether the file is uploaded
automatically when selected; default if option present: 'true'; default if
option not present: 'false'
--column
The JPA @Column name; no default
value
--notNull
Whether this value cannot be null;
default if option present: 'true'; default if option not present: 'false'
--permitReservedWords
Indicates whether reserved words
are ignored by Roo; default if option present: 'true'; default if option not
present: 'false'
VII. field jms template
Insert a JmsOperations field into an existing
type.
field jms template
--fieldName
The name of the field to add;
default: 'jmsOperations'
--class
The name of the class to receive
this field; default if option not present: '*'
--async
Indicates if the injected method
should be executed asynchronously; z
VIII. field number
Adds
a private numeric field to an existing Java source file.
field number --fieldName --type
--fieldName
The name of the field to add; no
default value (mandatory)
--type
The Java type of the entity; no
default value (mandatory)
--class
The name of the class to receive
this field; default if option not present: '*'
--notNull
Whether this value cannot be null;
default if option present: 'true'; default if option not present: 'false'
--nullRequired
Whether this value must be null;
default if option present: 'true'; default if option not present: 'false'
--decimalMin
The BigDecimal string-based
representation of the minimum value; no default value
--decimalMax
The BigDecimal string based
representation of the maximum value; no default value
--digitsInteger
Maximum number of integral digits
accepted for this number; no default value
--digitsFraction
Maximum number of fractional
digits accepted for this number; no default value
--min
The minimum value; no default
value
--max
The maximum value; no default
value
--column
The JPA @Column name; no default
value
--comment
An optional comment for JavaDocs;
no default value
--value
Inserts an optional Spring @Value
annotation with the given content; no default value
--transient
Indicates to mark the field as
transient; default if option present: 'true'; default if option not present:
'false'
--primitive
Indicates to use a primitive type
if possible; default if option present: 'true'; default if option not present:
'false'
--unique
Indicates whether to mark the
field with a unique constraint; default if option present: 'true'; default if
option not present: 'false'
--permitReservedWords
Indicates whether reserved words
are ignored by Roo; default if option present: 'true'; default if option not
present: 'false'
For
example : field number --fieldName price --type java.lang.Float
IX. field other
Inserts a private field into the specified
file.
field other --fieldName --type
--fieldName
The name of the field; no default
value (mandatory)
--type
The Java type of this field; no
default value (mandatory)
--class
The name of the class to receive
this field; default if option not present: '*'
--notNull
Whether this value cannot be null;
default if option present: 'true'; default if option not present: 'false'
--nullRequired
Whether this value must be null;
default if option present: 'true'; default if option not present: 'false'
--comment
An optional comment for JavaDocs;
no default value
--column
The JPA @Column name; no default
value
--value
Inserts an optional Spring @Value
annotation with the given content; no default value
--transient
Indicates to mark the field as
transient; default if option present: 'true'; default if option not present:
'false'
--permitReservedWords
Indicates whether reserved words
are ignored by Roo; default if option present: 'true'; default if option not
present: 'false'
X. field reference
Adds
a private reference field to an existing Java source file (eg the 'many' side
of a many-to-one).
field reference --fieldName --type
--fieldName
The name of the field to add; no
default value (mandatory)
--type
The Java type of the entity to
reference; no default value (mandatory)
--class
The name of the class to receive
this field; default if option not present: '*'
--notNull
Whether this value cannot be null;
default if option present: 'true'; default if option not present: 'false'
--nullRequired
Whether this value must be null;
default if option present: 'true'; default if option not present: 'false'
--joinColumnName
The JPA @JoinColumn name; no
default value
--referencedColumnName
The JPA @JoinColumn referencedColumnName;
no default value
--cardinality
The relationship cardinality at a
JPA level; default: 'MANY_TO_ONE'
--fetch
The fetch semantics at a JPA
level; no default value
--comment
An optional comment for JavaDocs;
no default value
--transient
Indicates to mark the field as
transient; default if option present: 'true'; default if option not present:
'false'
--permitReservedWords
Indicates whether reserved words
are ignored by Roo; default if option present: 'true'; default if option not present:
'false'
For example : field
reference --fieldName base --type ~.domain.Base
XI. field set
Adds
a private Set field to an existing Java source file (eg the 'one' side of a
many-to-one).
field set --fieldName --type
--fieldName
The name of the field to add; no
default value (mandatory)
--type
The entity which will be contained
within the Set; no default value (mandatory)
--class
The name of the class to receive
this field; default if option not present: '*'
--mappedBy
The field name on the referenced
type which owns the relationship; no default value
--notNull
Whether this value cannot be null;
default if option present: 'true'; default if option not present: 'false'
--nullRequired
Whether this value must be null;
default if option present: 'true'; default if option not present: 'false'
--sizeMin
The minimum number of elements in
the collection; no default value
--sizeMax
The maximum number of elements in
the collection; no default value
--cardinality
The relationship cardinality at a
JPA level; default: 'MANY_TO_MANY'
--fetch
The fetch semantics at a JPA
level; no default value
--comment
An optional comment for JavaDocs;
no default value
--transient
Indicates to mark the field as
transient; default if option present: 'true'; default if option not present:
'false'
--permitReservedWords
Indicates whether reserved words
are ignored by Roo; default if option present: 'true'; default if option not
present: 'false'
For
example : field
set --fieldName toppings --type ~.domain.Topping
XII. field string
Adds a private string field to an existing
Java source file.
field string --fieldName
--fieldName
The name of the field to add; no
default value (mandatory)
--class
The name of the class to receive
this field; default if option not present: '*'
--notNull
Whether this value cannot be null;
default if option present: 'true'; default if option not present: 'false'
--nullRequired
Whether this value must be null;
default if option present: 'true'; default if option not present: 'false'
--decimalMin
The BigDecimal string-based
representation of the minimum value; no default value
--decimalMax
The BigDecimal string based
representation of the maximum value; no default value
--sizeMin
The minimum string length; no
default value
--sizeMax
The maximum string length; no
default value
--regexp
The required regular expression
pattern; no default value
--column
The JPA @Column name; no default
value
--value
Inserts an optional Spring @Value
annotation with the given content; no default value
--comment
An optional comment for JavaDocs;
no default value
--transient
Indicates to mark the field as
transient; default if option present: 'true'; default if option not present:
'false'
--unique
Indicates whether to mark the
field with a unique constraint; default if option present: 'true'; default if
option not present: 'false'
--permitReservedWords
Indicates whether reserved words
are ignored by Roo; default if option present: 'true'; default if option not
present: 'false'
For example : field
string --fieldName address --sizeMax 30
4.
Addon Command
i. addon info bundle
Provide
information about a specific Spring Roo Add-on
addon
info bundle --bundleSymbolicName
--bundleSymbolicName
The bundle symbolic name
for the add-on of interest; no default value (mandatory)
ii. addon info id
Provide
information about a specific Spring Roo Add-on
addon
info id --searchResultId
--searchResultId
The bundle ID as
presented via the addon list or addon search command; no default value
(mandatory)
Install
Spring Roo Add-on
addon
install bundle --bundleSymbolicName
--bundleSymbolicName
The bundle symbolic name
for the add-on of interest; no default value (mandatory)
iv. addon install id
Install
Spring Roo Add-on
addon
install id --searchResultId
--searchResultId
The bundle ID as
presented via the addon list or addon search command; no default value
(mandatory)
v. addon list
List
all known Spring Roo Add-ons (up to the maximum number displayed on a single
page)
addon
list
--refresh
Refresh the add-on index
from the Internet; default if option present: 'true'; default if option not
present: 'false'
--linesPerResult
The maximum number of
lines displayed per add-on; default: '2'
--maxResults
The maximum number of
add-ons to list; default: '99'
--trustedOnly
Only display trusted
add-ons in search results; default if option present: 'true'; default if option
not present: 'false'
--communityOnly
Only display community
provided add-ons in search results; default if option present: 'true'; default
if option not present: 'false'
--compatibleOnly
Only display compatible
add-ons in search results; default if option present: 'true'; default if option
not present: 'false'
vi. addon remove
Remove
Spring Roo Add-on
addon
remove --bundleSymbolicName
--bundleSymbolicName
The bundle symbolic name
for the add-on of interest; no default value (mandatory)
vii. addon search
Search
all known Spring Roo Add-ons
addon
search
--requiresDescription
A comma separated list
of search terms; default: '*'
--refresh
Refresh the add-on index
from the Internet; default if option present: 'true'; default if option not
present: 'false'
--linesPerResult
The maximum number of
lines displayed per add-on; default: '2'
--maxResults
The maximum number of
add-ons to list; default: '20'
--trustedOnly
Only display trusted
add-ons in search results; default if option present: 'true'; default if option
not present: 'false'
--compatibleOnly
Only display compatible
add-ons in search results; default if option present: 'true'; default if option
not present: 'false'
--communityOnly
Only display community
provided add-ons in search results; default if option present: 'true'; default
if option not present: 'false'
--requiresCommand
Only display add-ons in
search results that offer this command; no default value
viii. addon upgrade all
Upgrade
all relevant Spring Roo Add-ons / Components for the current stability level
addon
upgrade all
This command does not
accept any options.
ix. addon upgrade available
List
available Spring Roo Add-on / Component upgrades
addon
upgrade available
--addonStabilityLevel
The stability level of
add-ons or components which are presented for upgrading (default: ANY); no
default value
x. addon upgrade bundle
Upgrade
a specific Spring Roo Add-on / Component
addon
upgrade bundle --bundleSymbolicName
--bundleSymbolicName
The bundle symbolic name
for the add-on to upgrade; no default value (mandatory)
xi. addon upgrade id
Upgrade
a specific Spring Roo Add-on / Component from a search result ID
addon
upgrade id --searchResultId
--searchResultId
The bundle ID as
presented via the addon list or addon search command; no default value
(mandatory)
xii. addon upgrade settings
Settings
for Add-on upgrade operations
addon
upgrade settings
--addonStabilityLevel
The stability level of
add-ons or components which are presented for upgrading; no default value
5.
Backup Command
Backup
your project to a zip file
backup
This command does not
accept any options.
6.
ClassPath Command
Creates
a new Java class source file in any project path
class
--class
--class
The name of the class to
create; no default value (mandatory)
--rooAnnotations
Whether the generated
class should have common Roo annotations; default if option present: 'true';
default if option not present: 'false'
--path
Source directory to
create the class in; default: 'FOCUSED|SRC_MAIN_JAVA'
--extends
The superclass (defaults
to java.lang.Object); default if option not present: 'java.lang.Object'
--abstract
Whether the generated
class should be marked as abstract; default if option present: 'true'; default
if option not present: 'false'
--permitReservedWords
Indicates whether
reserved words are ignored by Roo; default if option present: 'true'; default
if option not present: 'false'
7.
Dbre Command
i. database introspect
Displays
database metadata
database
introspect --schema
--schema
The database schema
names. Multiple schema names must be a double-quoted list separated by spaces;
no default value (mandatory)
--file
The file to save the
metadata to; no default value
--enableViews
Display database views;
default if option present: 'true'; default if option not present: 'false'
ii. database reverse engineer
Create
and update entities based on database metadata
database
reverse engineer --schema
--schema
The database schema
names. Multiple schema names must be a double-quoted list separated by spaces;
no default value (mandatory)
--package
The package in which new
entities will be placed; no default value
--testAutomatically
Create automatic
integration tests for entities; default if option present: 'true'; default if
option not present: 'false'
--enableViews
Reverse engineer
database views; default if option present: 'true'; default if option not
present: 'false'
--includeTables
The tables to include in
reverse engineering. Multiple table names must be a double-quoted list
separated by spaces
--excludeTables
The tables to exclude
from reverse engineering. Multiple table names must be a double-quoted list
separated by spaces
--includeNonPortableAttributes
Include non-portable JPA
@Column attributes such as 'columnDefinition'; default if option present:
'true'; default if option not present: 'false'
--activeRecord
Generate CRUD active
record methods for each entity; default: 'true'
8.
Maven Command
i. dependency add
Adds a
new dependency to the Maven project object model (POM)
dependency
add --groupId --artifactId --version
--groupId
The group ID of the
dependency; no default value (mandatory)
--artifactId
The artifact ID of the
dependency; no default value (mandatory)
--version
The version of the
dependency; no default value (mandatory)
--classifier
The classifier of the
dependency; no default value
--scope
The scope of the
dependency; no default value
ii. dependency remove
Removes
an existing dependency from the Maven project object model (POM)
dependency
remove --groupId --artifactId --version
--groupId
The group ID of the
dependency; no default value (mandatory)
--artifactId
The artifact ID of the
dependency; no default value (mandatory)
--version
The version of the
dependency; no default value (mandatory)
--classifier
The classifier of the
dependency; no default value
iii. maven repository add
Adds a
new repository to the Maven project object model (POM)
maven
repository add --id --url
--id
The ID of the repository;
no default value (mandatory)
--name
The name of the
repository; no default value
--url
The URL of the
repository; no default value (mandatory)
iv. maven repository remove
Removes
an existing repository from the Maven project object model (POM)
maven
repository remove --id --url
--id
The ID of the
repository; no default value (mandatory)
--url
The URL of the
repository; no default value (mandatory)
v. module create
Creates
a new Maven module
module
create --moduleName --topLevelPackage
--moduleName
The name of the module;
no default value (mandatory)
--topLevelPackage
The uppermost package
name (this becomes the <groupId> in Maven and also the '~' value when
using Roo's shell); no default value (mandatory)
--java
Forces a particular
major version of Java to be used (will be auto-detected if unspecified; specify
6 or 7 only); no default value
--parent
The Maven coordinates of
the parent POM, in the form "groupId:artifactId:version"; no default
value
--packaging
The Maven packaging of
this module; default if option not present: 'jar'
--artifactId
The artifact ID of this
module (defaults to moduleName if not specified); no default value
vi. module focus
Changes
focus to a different project module
module
focus --moduleName
--moduleName
The module to focus on;
no default value (mandatory)
Executes
the assembly goal via Maven
perform
assembly
This command does not
accept any options.
Executes
a full clean (including Eclipse files) via Maven
perform
clean
This command does not
accept any options.
ix. perform command
Executes
a user-specified Maven command
perform
command --mavenCommand
--mavenCommand
User-specified Maven
command (eg test:test); no default value (mandatory)
x. perform eclipse
Sets up Eclipse
configuration via Maven (only necessary if you have not installed the m2eclipse
plugin in Eclipse)
perform
eclipse
This command does not
accept any options.
xi. perform package
Packages
the application using Maven, but does not execute any tests
perform
package
This command does not
accept any options.
xii. perform tests
Executes
the tests via Maven
perform
tests
This command does not
accept any options.
xiii. project
Creates
a new Maven project
project
--topLevelPackage
--topLevelPackage
The uppermost package
name (this becomes the <groupId> in Maven and also the '~' value when
using Roo's shell); no default value (mandatory)
--projectName
The name of the project
(last segment of package name used as default); no default value
--java
Forces a particular
major version of Java to be used (will be auto-detected if unspecified; specify
5 or 6 or 7 only); no default value
--parent
The Maven coordinates of
the parent POM, in the form "groupId:artifactId:version"; no default
value
--packaging
The Maven packaging of
this project; default if option not present: 'jar'
9.
Data On Demand Commands
i.dod
Creates
a new data on demand for the specified entity
dod
--entity
The entity which this
data on demand class will create and modify as required; default if option not
present: '*'
--class
The class which will be
created to hold this data on demand provider (defaults to the entity name +
'DataOnDemand'); no default value
--permitReservedWords
Indicates whether reserved
words are ignored by Roo; default if option present: 'true'; default if option
not present: 'false'
References
http://blog.springsource.org/2009/05/27/roo-part-2/
No comments:
Post a Comment