Home > FAQs > Cookbook > Using Maven to Setup an Eclipse Project for Your Application

Because the framework is under active development, these instructions are likely to be out-of-date in specifics.  Hopefully the basic strategies will still apply.

First, if xwork is not available froma Maven repo (for example, if it has moved to a SNAPSHOT dependency), then check it out from the repository and run "mvn install" - this gives you the snapshot of XWork as well as the POM for resolving transitive dependencies like oscore.  This may apply to other dependencies which are not on ibiblio, but when I first tried this, xwork was the one with enough transitive dependencies to be hard to manage any other way.

For other dependencies which are not on ibiblio, from the SAF repository checkout (sandbox), run "ant common.jar". This will cause Ivy to fetch the other dependencies you need.

Then, for each of the missing dependencies, install using "mvn install:install-file" Below are examples, but of course the path to your ".ivy-cache" directory will differ, and the versions are likely to change for lots of reason, but especially if the dependency is a SNAPSHOT with a timestamp in the filename.

mvn install:install-file -DartifactId=dwr -DgroupId=dwr -Dpackaging=jar -Dversion=1.1.3-beta \
    -Dfile=/Users/germuska/.ivy-cache/dwr/dwr/jars/dwr-1.1-beta-3.jar

mvn install:install-file -DartifactId=plexus-container-default -DgroupId=org.codehaus.plexus \
    -Dpackaging=jar -Dversion=1.0-alpha-10-SNAPSHOT \
    -Dfile=/Users/germuska/.ivy-cache/org.codehaus.plexus/plexus-container-default/jars/plexus-container-default-1.0-alpha-10-20060215.222714-5.jar

If you are not running Java 5.0, then you will also need to install the dom3 APIs.  As far as we can tell, the compiled JAR is not on any Maven repository. the source for dom3 can be found here: http://ibiblio.org/maven2/xerces/dom3-xml-apis/1.0/dom3-xml-apis-1.0-sources.jar&nbsp; You can build a jar from it and then put it in your own repository.  After that, edit webwork's pom.xml to point to the dependency -- there is a comment in the <profiles> section acknowledging the need for this, but presumably it will not be changed until dom3 gets officially loaded as a compiled JAR to some maven repository.  There should be a way to use Maven2's settings.xml file to do this locally without editing pom.xml, but we have not had a chance to investigate this yet.

These steps may change as the  pom changes, but this kind of approach should work.