In order to build JWebUnit, you need to have Maven installed. This should not be any more difficult than installing ant. We've included a best practice installation and configuration for Maven.
JWebUnit is compiled with JDK 1.6 to ensure compatibility.
You need to download and install latest Sun JDK 1.6 for your platform. Let's say the JDK location is:
First you need to download the latest Maven, which currently is Maven-3.2.1 , make sure you download the binary archive (e.g. apache-maven-3.2.1-bin.tar.bz2).
Installing Maven should be easy: extract the file to any directory you like, let's say:
Next you need to do 2 things:
- add an environment variable M2_HOME which points to the install directory of Maven, i.e. /opt/apache-maven-3.2.1
- add $M2_HOME/bin (Linux) or %M2_HOME%\bin (Windows) to your path (using the variable you can switch more easily when a new version arrives)
You can test that Maven is correctly installed by running in a shell: mvn -v
Maven defines several goals, for creating and building your application. A goal is similar to an Ant-task. For instance: to compile the java sources one could do:
See the Maven site for more information on the different goals and plugins that are available.
Building JWebUnit merely consist of running Maven:
You now have successfully built JWebUnit. The files are in your private repository. To remove all traces of generated files, allowing your repository to install from scratch, use:
JWebUnit is supported with a suite of test cases, which ensure that the testing framework works as expected. These tests are run through Maven by running:
For those who don't want to use Maven, we have to provide a zip with all required files.
mvn package assembly:assembly
The files are in target directory.
Due to findbugs memory usage, following parameter is required:
The files are in target/site directory of each module.
If you want to test the final assembled site, just hit:
mvn site:stage -DstagingDirectory=C:\fullsite
You can of course customize the destination folder of the assembled site.