General information on dependenciesAs 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.
Below is a brief table of configurations and the functionality each will provide. Dependency configuration functionalities
Dependency resolving in your Webwork based projectsManual resolvingAs 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 dependenciesThe 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. |