This page generic instructions for setting up the development tools used in the Danno, Emmet and Chico projects.
Before you can build these projects, you will need to install a suitable Java SDK, and install / set up the Apache Maven build system on your machine. You may also need to preload your local repository; i.e. the one in "~/.m2/repository" with the "jsp-api" JAR file.
To build the Danno / Dannotate project, you need a copy of Sun's Java 6.0 SDK installed and configured. To check whether this has been done already, open a command shell window and run the following:
javac -version
If a Java 6.0 SDK has been installed, and your shell environment is configured, it should output something like this:
javac 1.6.0_14
If this doesn't work, or if it reports an older version of Java (e.g. "1.4.x" or "1.5"), figure out if this is just an issue with your $PATH (or %PATH% on Windows). If not, you will need to download and install an appropriate Java 6.0 distribution.
Once you have established that a Java 6.0 JDK is installed, check that your $PATH (%PATH%) variable includes the JDK installation's "bin" subdirectory, and that your $JAVA_HOME (%JAVA_HOME%) variable points to the installation directory.
To build the Danno / Dannotate project, you need a copy of Apache Maven 2.2.x or later installed and configured. To check whether this has been done already, open a command shell window and run the following:
mvn -v
If Maven 2.2 has been installed, you should see output that looks something like this:
Maven version: 2.2.1
Java version: 1.6.0_14
OS name: "linux" version: "2.6.9-89.0.9.el" arch: "i386" Family: "unix"If this doesn't work, or if it reports an older version of Maven, you will need to install Maven 2.2.
Notes:
Like most J2EE applications, the Danno and Dannotate server side components depend on Sun's J2EE servlet APIs. Unfortunately the Maven Central repository does not contain a copy of the relevant JAR file for licensing reasons. The simple solution is to take the JAR file from your Tomcat 5.5 installation and install it in your local repository as follows:
mvn install:install-file -Dfile=$CATALINA_HOME/common/lib/jsp-api.jar \
-DgroupId=javax.servlet -DartifactId=jsp-api -Dversion=1.2 -Dpackaging=jar(If you have a site repository, it would be worth installing the the "jsp-api" JAR file there.)
We develop Danno and Dannotate using Eclipse, and a Subversion checkout of the project will include the ".project" and ".classpath" files used by Eclipse. We recommend using a recent "Eclipse for JEE" distribution, and adding a Subversion plugin (e.g. Subversive) and M2Eclipse.
When Using M2Eclipse, it is important to enable "Maven>Nested Modules" for the project to allow Eclipse to build the project. Also, beware that an Eclipse build of a Maven project allows a Java source level dependencies that a command-line Maven build flags as errors. It is therefore a good idea to build from the command-line when creating WAR files for deployment.