Getting Started

Domgen is most commonly used when building Java EE projects using the Buildr build tool so that is what is described in the quick start guide.

Typically developers braid in a copy of domgen to vendor/plugins/domgen using a command such as;

 $ braid add https://github.com/realityforge/domgen.git vendor/plugins/domgen

Assuming the projects uses bundler for managing ruby dependencies and thus has a Gemfile in the root directory. Add the following line to Gemfile and re-run bundle install.

gem 'domgen', '= 0.19.0.dev', :path => 'vendor/tools/domgen'

Then define a tasks/domgen.rake file that loads the repository and generates sql for the project.

tasks/domgen.rake
# Load domgen
require 'domgen'

# Define the task "domgen:load" that loads the reposiory from the file "../architecture.rb"
Domgen::Build.define_load_task

# Define the "domgen:sql" task to generate SQL Server sql into database/generated directory
Domgen::Build.define_generate_task([:mssql], :key => :sql, :target_dir => 'database/generated')

Define architecture.rb

TODO