You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

Getting the sources

Distribution

The current distribution packages of webwork contain all sources, as well as all needed libraries. So getting the package will provide you with the source, but unfortunately if you want to build webwork from scratch, this is not enough. You will still have to get the opensymphony common module as well, because the build process relies on it. As time of writing of this document, there is no distribution package for the common module, so you need to check it out from CVS as described below.

CVS

The sources are are hosted via CVS on java.net. So getting your sources is quite standard:

  1. If you have not already done, login to repository:
    cvs -d :pserver:guest@cvs.dev.java.net:/cvs login
  2. Checkout the the webwork sourcetree:
    cvs -d :pserver:guest@cvs.dev.java.net:/cvs checkout webwork
  3. Checkout the the opensymphony common sourcetree:
    cvs -d :pserver:guest@cvs.dev.java.net:/cvs checkout opensymphony

If you are a registered user at Java.net, you might use your username instead of anonymous guest account.
For detailed information on how to setup different clients, visit https://webwork.dev.java.net/servlets/ProjectSource.

Building

We assume that you are familiar with ant as the standard build tool in the Java world.

What is Ivy?

If you checked out the sources from CVS, you might have noticed that the lib directory is empty. Unfortunately this does not mean that webwork has no external dependecies at all. To be honest, as a full featured MVC framework it has lots of dependencies, which in turn means that there has to be some dependency management. This is were Ivy comes to play.
Ivy is a free java based dependency manager, with powerful features such as transitive dependencies, maven repository compatibility, continuous integration, html reports and many more. Ivy is fully integrated with ant, so you do not have to get into a complicated tool. See http://jayasoft.org/ivy for details.

Installing and using Ivy

The installation is quite trivial: Put a copy of the ivy-1.x.jar found in the common directory of the opensymphony module in your $ANT_HOME/lib directory.
If you want to test the Ivy functionality, ensure you have an internet connection. Change into the webwork module directory and execute ant init (as you might guess, any other task depends on init). Ivy will now resolv all dependencies and (hopefully) download all required jars and put it into the lib directory.
See Dependencies for informations on how to integrate Ivy in your own Webwork2 based projects.

JUnit and Clover

The full build process will require JUnit and Clover.
Place a copy of junit.jar (>= 3.8.1) and clover.jar (>= 1.3.9) into your $ANT_HOME/lib directory (if not already exists). If you haven't got these jars at hand, look into the lib directory of your webwork module after you called ant init in the step before...
Opensymphony Clover license is found in the common directory of the opensymphony module. Place the clover-license.jar into your $ANT_HOME/lib directory as well. Now you are ready to ...

Build

Call ant jar or simply ant to build the webwork jars. Play around with other targets, as you like.

JDK/JRE compatibility

Webwork requires JDK 1.4.2+ to build. JDK 5.0 is not required for building.
Webwork based applications require JRE 1.4.2+ to run. JRE 5.0 is not required to run unless your application uses the optional XWork-tiger module, which adds some Java 5.0 specific features to xwork functionality.

  • No labels