Building Shotoku
Configuration
The file through which all configuration is done is located in shotoku-base/src/etc/shotoku.properties, or just shotoku-base.jar/shotoku.properties, if you use the compiled version. In this file, you define some basic shotoku properties as well as repositories that you want to use. It is possible to have many repositories, each with a different repository implementation.
The basic properties are:
shotoku.id.default = default - this is the default id that will be assumed when calling ContentManager.getContentManager() without explicitly setting the id.
shotoku.ids = default - this is a list of all repository ids that are defined in this file and should be initialized (that is, should be available for use).
shotoku.embedded = false - sets working mode to application server or embedded (see here).
For each repository, its properties are named shotoku.<repository-id>.propertyname. One property required for all repositories is:
shotoku.<repository id>.implementation - a full name (with package) of a class extending ContentManager.
for details about properties for other implementations, see content managers and their configuration
There are also some advanced properties, which are best left to their default values:
shotoku.service.interval - number of milliseconds between two updates cycles of Shotoku service.
shotoku.transfer.buffer.size - size of a transfer buffer used for sending chunks of files read from Shotoku to the user.
There is also a velocity.properties file, in which you can set the default properties with which Velocity engines will be initialized.
Application server configuration
To successfully start Shotoku, you will need relatively need AS version - I recommend 4.0.4 (the newest one). Also, you must install EJB3 (http://jboss.org/products/ejb3) in version RC8 or newer and if you want to use the annotations - AOP (detailed configuration is described here). Also, be sure to run the server in the "all" configuration.
Build
The build process is controlled by Maven 1.0 (http://maven.apache.org). Here are the available goals:
shotoku:clean
shotoku:build - builds all parts of shotoku.
shotoku:deploy - deploys:
shotoku.sar - shotoku base service
shotoku-.ejb3/war - individual shotoku modules, depending on configuration
shotoku-aop.aop - which is shotoku annotations definitions.
all - does all of the above.
Before building, be sure to fill in build.properties with a proper path to your jboss installation. There is a build.properties.sample file with guidelines on how to do that.
You can also easily control which modules should be built and deployed. In project.properties, there are two properties:
shotoku.subprojects.cms - lists all modules that are implementations of ContentManager
shotoku.subprojects - lists all additional modules
If you want a module not to be built and deployed, simple remove it from this list. Note however, that the order in which modules are listed is sometimes important.
Comments