Directory Structure

The directory structure is as follows

      control file LICENSE.txt LICENSE file 

Building of the System

The project is managed and built by maven and so you will need maven (maven.apache.org) installed. Once you have this you can do a variety of things, including

  • Build the sub-project by cd'ing into the directory and typing
    maven clean jar jar:install
    This cleans out the system, builds the jar(s), and then installs it in the Maven repository. The jar's built are swarm-core-{version}.jar and swarm-system-{version}.jar.
  • Build the Application sub-project by cd'ing to the swarm-App directory and typing
    maven clean war
    This cleans out the system, and builds the war. Currently the Maven war plugin has a bug in the naming of the war file (where it omits the version). To do the install in the Maven repository you will have to copy it across manually.
  • Generate the EAR for the project by cd'ing to the directory Swarm-EAR and typing
    maven clean ear ear:install
    This cleans out the system, builds the ear and installs it in the Maven repository. The EAR file built is Swarm-EAR-{version}.ear.
  • Generate the website by typing
    maven
              multiproject
    and this puts the generated website in target/docs/

Deployment and startup : JBoss

To deploy the Swarm servlet/JSP application you need to

  1. update the $JBOSS_HOME/server/default/deploy/mail-service.xml to specify the SMTP host (in case you hadn't done this before)
  2. You can then access the application at /swarm/ for the JBoss webserver host/port.

When you start up your J2EE engine with the Swarm application deployed the system will

  1. create a top-level ProductCategory for the shop
  2. load up a set of order statuses

There are also some scripts in the Swarm-Test/bin/ directory which can be used to populate the inventory with sample data.