The Rio archetype allows you to create a Rio application in seconds.
If you don't have Maven, you can get it here. Install it and then invoke:
mvn archetype:generate -DarchetypeGroupId=org.rioproject -DarchetypeArtifactId=rio-archetype -DarchetypeRepository=http://www.rio-project.org/maven2 -DarchetypeVersion=5.0-M2
Make sure it is all typed as a single line. It's been formatted
here for readability.
Or, you can simply run:
RIO_HOME/bin/rio create-project
If this is the first time you do this, you'll see a large number
of download messages.
Make sure you have the RIO_HOME environment variable set.
You will be prompted to enter the artifactId, service to create (this will be the classname of the service interface), the groupId, version and package name. The following output shows the interaction:
[INFO]
------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO] task-segment: [archetype:generate] (aggregator-style)
[INFO]
------------------------------------------------------------------------
[INFO] Preparing archetype:generate
[INFO] No goals needed for project - skipping
[INFO] Setting property: classpath.resource.loader.class => 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
[INFO] Setting property: velocimacro.messages.on => 'false'.
[INFO] Setting property: resource.loader => 'classpath'.
[INFO] Setting property: resource.manager.logwhenfound => 'false'.
[INFO] [archetype:generate {execution: default-cli}]
[INFO] Generating project in Interactive mode
[INFO] Archetype defined by properties
Define value for artifactId: : myexample
Define value for service: : Hello
Define value for groupId: : example
Define value for version: 1.0-SNAPSHOT: :
Define value for package: example: : com.foo.example
Confirm properties configuration:
artifactId: myexample
service: Hello
groupId: example
artifactId: myexample
version: 1.0-SNAPSHOT
package: com.foo.example
Y: :
[INFO]
------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 39 seconds
[INFO] Finished at: Wed Jan 06 17:40:02 EST 2010
[INFO] Final Memory: 13M/80M
[INFO]
------------------------------------------------------------------------Simply 'cd' into your newly created project directory and type 'mvn install' and the service will be built, packaged, tested and installed.
The generated Maven project is a multi-module project with the following structure:

The project has the following items generated:
The package, artifactId and Service items are replaced with the values you provide when
prompted by the Rio Maven Archetype.
Maven also comes pre-packaged with plugins for getting up and running with your favorite IDE. Try using mvn idea:idea or mvn eclipse:eclipse for each respective editor.