Getting Started

  1. Checkout the source code. The default configuration expects the project location to be under ${user.home}/workspace.

    Under Windows this would be: C:\Documents and Settings\markmo\workspace

    And under Mac OS X: /Users/markmo/workspace

  2. Set the BOOTSTRAP_HOME env variable to the project root directory; such as:


    In Windows, right-click the 'My Computer' icon, click Properties, go to the Advanced tab, click Environment Variables, and add a new System variable.

    In Mac OS X, you can edit the .profile file in the user's home directory as follows: BOOTSTRAP_HOME=/Users/markmo/workspace/bootstrap

  3. Add the bin directory to the System Path, such as:

    Windows: PATH=%BOOTSTRAP_HOME%\bin;...

    Make the sure the shell scripts in the bin directory are executable. This can be done on UNIX systems with: chmod +x <script file name>

  4. Make sure the FLEX_HOME env variable is set to the Flex 2 SDK directory.

  5. Build the project. This depends on Maven 2. I am using version 2.0.6. Once Maven is installed, change to the project root directory (BOOTSTRAP_HOME) and type:

    mvn install

  6. Create a database for the generated project. I have packaged HSQLDB with Bootstrap for testing purposes. Change to the bin directory (BOOTSTRAP_HOME/bin) and type:

    Windows: startdb.bat <generated project name>
    Mac OS X: ./ <generated project name>

    The generated application expects a password for the default database user: 'sa'. Open the database client. Change to the bin directory (BOOTSTRAP_HOME/bin) and type: Windows: dbmanager.bat <generated project name>
    Mac OS X: ./ <generated project name>

    Execute the following SQL command: set password 'mocatad'

    This is the default password expected by the generated application.

  7. To generate an application, change to the workspace directory where you would like to generated the application source and type: flex <groupId> <project name> <path to XMI file>

    For example, change to the same workspace directory in which the Bootstrap project is located. An example XMI file is located in the 'xmi' directory. Type: flex test xmi/flextest.xmi

    There are three main commands in the script. The first is to create the project directories and build files using the Maven Archetype plugin. The second command runs the Bootstrap Generator to create the project source files from the XMI metadata. The third command compiles and packages the generated project. Currently, the Windows bootstrap.bat script exits at the end of step 1. Run gen.bat with the same parameters to complete steps 2 and 3.

    The build environment of the generated application embeds the Jetty 6 Web Server.

  8. To run the application, change to the 'web' sub-directory under the generated project directory; e.g.

    cd test/web

    Start the application by typing: mvn jetty6:run

    The database schema will be automatically generated and updated as long as the database server is running.

    Open a browser and navigate to: http://localhost:8080/<generated project name>

    e.g. http://localhost:8080/test

    Click on the link to launch the Flex UI.