General information on dependencies

As with most modern and robust frameworks, WebWork has a number of external dependencies. However, in the case of WebWork, only a fraction of them are required. You can determine exactly what these dependencies are by looking in the docs/dependencies directory of the distribution, or by clicking here. The required dependencies are all the libraries listed in the default configuration.
IoC Container dependencies

As of Webwork 2.2, Spring is the recommended IoC container. If you plan to use Spring you will need the jars of the spring configuration. Other IOC containers are supported as well, but we recommend Spring as it is the most active and vibrant community

 

Below is a brief table of configurations and the functionality each will provide.

Dependency configuration functionalities

Configuration Required to...
ajax enable AJAX-related features in the UI tags
build build WebWork from source
default run the bare minimum support for WebWork
spring use Spring integration
fileupload support file uploads when the "jakarta" parser is selected in webwork.properties (recommended)
fileupload-cos support file uploads when the "cos" parser is selected in webwork.properties
fileupload-pell support file uploads when the "pell" parser is selected in webwork.properties
jasperreports generate reports using JasperReports
jfree generate reports using JFreeCharts
portlet support for WebWork-enabled porlets
quickstart start your applications using QuickStart
sitemesh use FreeMarker- and Velocity-enabled decorators with SiteMesh
velocity render results in Velocity
xslt render results using XSLT

Dependency resolving in your Webwork based projects

Manual resolving

As stated previously, a look at the dependency page will provide you with the information on which jars you will need to include in your Webwork-based project.

Integrating Ivy to resolv dependencies

The much easier way for dependency resolving is to integrate Ivy into your project. See Building WebWork for a introduction to Ivy and installation instructions. Here is a sample ivy.xml for a Webwork-based project, requiring the latest release of Webwork 2.2 with freemarker, sitemesh and jasperreports functionality:

<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" xhref="http://www.jayasoft.fr/org/ivyrep/ivy-doc.xsl"?>
<ivy-module version="1.0">
    <info organisation="my.organisation.net" module="myproject"
          revision="1.0-alpha-1"
          status="integration"
          publication="20051022053520">
        <license name="Apache" url="http://www.apache.org/licenses/LICENSE-2.0.txt"/>
        <ivyauthor name="Me" url="http://my.organisation.net/"/>
        <description homepage="http://my.organisation.net/myproject">
            My first Webwork2 based project.
            <br/>
        </description>
    </info>
    <configurations>
        <conf name="build" visibility="private"/>
        <conf name="default"/>
    </configurations>
    <publications>
        <artifact name="myproject" type="jar" conf="default"/>
    </publications>
    <dependencies>
        <!-- build only dependencies -->
        <dependency org="junit" name="junit" rev="3.8.1" conf="build->*"/>
        <dependency org="servletapi" name="servletapi" rev="2.4" conf="build->*"/>

        <!-- runtime (and build) dependencies -->
        <dependency org="log4j" name="log4j" rev="1.2.9" conf="default->default"/>
        <dependency org="opensymphony" name="webwork" rev="2.2+" conf="default->default,freemarker,sitemesh,jasperreports"/>

    </dependencies>
</ivy-module>

 

The following is a sample repository resolver configuration ivyconf.xml

<ivyconf>
    <properties file="ivyconf.properties"/>
    <conf defaultResolver="default" checkUpToDate="true"/>
    <resolvers>
        <ivyrep name="libraries"/>
        <chain name="default">
            <url name="opensymphony" checkmodified="true">
                <ivy pattern="http://ivyrep.opensymphony.com/[organisation]/[module]/ivy-[revision].xml"/>
                <artifact
                        pattern="http://ivyrep.opensymphony.com/[organisation]/[module]/[artifact]-[revision].[type]"/>
            </url>
            <url name="contegix">
                <ivy pattern="http://repository.contegix.com/ivyrep/[organisation]/[module]/ivy-[revision].xml"/>
                <artifact
                        pattern="http://repository.contegix.com/ivyrep/[organisation]/[module]/[artifact]-[revision].[type]"/>
            </url>
            <ivyrep name="ivyrep"/>
            <ibiblio name="contegix-maven" root="http://repository.contegix.com/maven"/>
            <url name="maven">
                <artifact pattern="http://www.ibiblio.org/maven/[organisation]/jars/[module]-[revision].[type]"/>
            </url>
        </chain>
    </resolvers>
</ivyconf>

 

After integrating an appropriate Ivy init task into your project build file, Ivy will resolve all dependencies required by your project and download the needed jars. See Ivy documentation for more information on how to integrate Ivy in your own project, or just have a quick look in the Webwork2 build process.