Creating a new project

With java and ant installed, we're ready to go!

Create a new project directory

A new project can be initialized by opening a terminal creating a new directory named for the project. If you are using eclipse, create a new directory within your workspace directory. In Windows, with eclipse you might do something like: Change into the directory.

For the purposes of this walkthru, I'm going to assume the created project directory (aka project root) is C:\workspace\musicdemo\.

Download the Project Maker

Download benow-launch.jar into the project root. This is a small runnable jar which contains a light project manager, which we'll use to fetch and install the template for a new web project.

Run the Project Maker

Once downloaded, run

java -jar benow-launch.jar ProjectMaker --with web

To start grabbing the template: The web project template will be fetched and extracted, and initial project configuration is performed. You should see Project has been created if all finished successfully: At this point, everything you need to start working with a new web project has been setup.

Project Layout

The directory listing should now be: The directory structure is as follows:

bin scripts for launching the application, including bin/web.sh or bin/web.bat
build/java location for compiled java
docs documentation
etc configuration information
html root for files which may be accessed, including html, pages, images, css, etc
html/css css styles used in html/pages
html/css/page.css css for site style across pages
html/images images used within pages/html
html/images/logo.png logo used across pages
html/js javascript libraries
lib/java java libraries
lib/xsl xsl libraries
src/java java source code
var miscellaneous project resources
var/site site page look and feel includes

Creating the project in eclipse

The project can be added to eclipse via File->New->Java Project. As the template has been extracted to a directory within your workspace, specify the name of the directory as the project name. For this walkthu, that would be musicdemo. hit Next (hitting finish will cause issues).

Set the Default Output Folder to be musicdemo/build/java as shown and then hit Finish. (By default, eclipse uses musidemo/bin which will overwrite the file in bin/ from the template... not a good thing). When prompted, choose not to remove the old location:

You can now work with the project within Eclipse!