Clone wiki

Shampoo / SourceCompilation

Compile from source

Shampoo is a Java 6 SE-compliant, Ant-based, NetBeans web application project. Building from other IDEs and conversions to Maven-based projects are not covered here.

Get the latest development version

It's available through SVN checkout.

Dependencies

Re-link all the JAR files from the lib folder when you first import the project within Netbeans. The JDBC driver is missing if you use another database system than Apache Derby. The GWT SDK is not included either, only its runtime, but is needed.

Ant build

Since it's a Google Webkit (GWT)-based project, source files from the Client folder must be translated into JavaScript code by the GWT Compiler. You must install the GWT SDK first. Shampoo can use the latest version from the 2.6 branch.

NetBeans

If you use NetBeans, GWT4NB provides good automation procedures for maintaining Ant scripts with GWT bindings. You're strongly advised to install this module within your IDE if you plan to edit the Client part of the project. The NetBeans project definition file is otherwise standard and the compiled project is self-contained into a single WAR file to upload to a Java servlet container. Make sure your Servlet context path is correctly set if you want to run or debug the application: Project Properties → Run → Context Path

Command line

If you don't use NetBeans, you will have to manually add a few dependencies to Ant. The script uses a custom NetBeans task, org-netbeans-modules-java-j2seproject-copylibstask.jar. It also requires the reference Servlet 2.5+ API, servlet-api-2.5.jar if no servlet container is already readily available on your workstation. You must finally define the path to your GWT 2 libraries as well. Use the following variables on the command line to explicitly resolve those external dependencies:

ant -file build.xml \
  -Dj2ee.platform.classpath=/blahblah/servlet-api-2.5.jar \
  -Dlibs.CopyLibs.classpath=/blahblah/org-netbeans-modules-java-j2seproject-copylibstask.jar \
  -Dauxiliary.org-netbeans-modules-gwt4nb.GWTDir=/blahblah/gwt-2.6.0/ \
  dist

Test Environment Setup

Please follow the installation guide to setup your database, Shampoo clients, and streaming softwares.

Updated