Cosmo 0.2 Build Instructions
Note that these instructions are for
the 0.2 releases. The build and release packaging systems have changed dramatically for the 0.3 release. Instructions for building 0.3 are found at
CosmoBuildInstructions.
Setup
Set up your system for Java development as per the instructions at
JavaServerSetup.
Source Code Access
See
SubversionGuidelines for more information about OSAF's Subversion repositories.
Build the Server
You build the server by executing
maven build in the root directory of the checked-out module. You can remove all of the compiled source code and generated helper files with
maven clean. All generated files are placed into the target/ subdirectory.
Note that the build target will also execute all tests (see below). Skip the tests (often useful when making small incremental changes to the user interface) by passing a command line argument to maven:
maven -Dmaven.test.skip=true build
Run the Tests
There aren't too many tests yet, but those that exist can be run with
maven test.
JUnit writes detailed test output in XML format to target/test-reports/. This, and the brief console output it generates should be more than enough to debug test failures.
Run Cosmo
maven dist creates a dist/ subdirectory containing an unpacked distribution (cosmo-x.x/). You can run Cosmo right out of this directory with
dist/cosmo-x.x/bin/cosmoctl start. See
CosmoAdministrator for more details on running Cosmo.
Generate a Release
maven dist:release creates a packaged distribution of the Tomcat bundle at dist/cosmo-x.x.tar.gz. A separate unbundled WAR file will come in a future version.
Customize Your Build
All of the following customizations are placed in build.properties, overriding the properties set in build.properties.
Some common development customizations:
-
maven.compile.debug=on
-
maven.compile.deprecation=on
-
maven.compile.optimize=off
-
cosmo.webapp.reloadable=true
Maven downloads Tomcat 5.5.9 to package the bundled distribution. You can override the following properties to specify your favorite mirror and/or choose a different version of Tomcat:
-
ext.tomcat.package=jakarta-tomcat-5.5.9
-
ext.tomcat.url=http://downloads.osafoundation.org/cosmo/${ext.tomcat.package}.tar.gz
Dependencies
Cosmo is built on top of many external frameworks, libraries, and tools. Most are pulled straight from
Ibiblio's Maven repository, but some are handled specially:
- OSAF Server Commons, a set of OSAF-authored projects providing utilities for common server tasks and integration with other frameworks and toolsets
- JCR and Jackrabbit, of which we've taken snapshots; when they begin to issue formal releases, we'll use those instead
- A few random libraries that are not on Ibiblio for whatever reason
You do not need to build any of these dependencies. OSAF maintains its own
Maven repository which contains the above and mirrors Ibiblio for the rest of Cosmo's dependencies. It is not a full Ibiblio mirror.