Skip to content

Building From Source

Jamie Briant edited this page May 21, 2013 · 5 revisions

Building From Source

This is for 2.3.1. For the newer versions see the Readme.md file

Please don't delete this. Some of us still use 2.3.1.

Introduction

Spring Web Flow is built using a combination of Ant and Ivy. We plan to port the build system to Gradle in the near future. For the time being use the instructions on this page.

Check out the source code

If you haven't already, you'll need to set up Git on your local machine. See the instructions for Windows, Mac and Linux.

Next, clone the repository:

$ git clone git://github.com/SpringSource/spring-webflow.git

Or check it out using Subversion thanks to GitHub's dedicated support for Subversion clients:

$ svn checkout https://github.com/SpringSource/spring-webflow

Build all modules

Assuming you have Ant 1.7 (or higher):

$ cd spring-webflow
$ ant -f build-spring-webflow/build.xml

The first time it'll take longer as all dependencies (including optional ones) need to be downloaded into your local Ivy cache repository located in ivy_cache/repository. After the initial download is complete, the build should run between 2 and 5 minutes depending on your system. If you don't care about running tests and just want to build, use:

$ ant -f build-spring-webflow/build.xml jar

Install into your local Maven repository

Perhaps you've made local changes to your `spring-webflow repository, and now you'd like to test them against your Maven application or against the Spring Web Flow samples? Here's the command you need to install the Spring Web Flow artifacts in your local Maven repository:

$ ant -f build-spring-webflow/build.xml jar install-maven-central

Alternatively you can also run mvn install to do the same.

Building the Samples

The samples do not depend on Ivy and are built with Maven instead:

$ cd spring-webflow-samples
$ mvn package
$ ls */target/*.war

Importing the projects into an IDE

Assuming you've followed the steps above your local Ivy repository (ivy-cache/repository) and your local Maven repository (~/.m2/repository) should both be populated with the required dependencies.

If using Eclipse, create an IVY_CACHE classpath variable in your Eclipse Preferences that points to the location of the Ivy cache repository. Similarly ensure there is an M2_REPO classpath variable that points to the location of the local Maven repository. Then import the projects from the top level directory of your checkout area.

Both IntelliJ and NetBeans have built-in support for creating Maven projects from existing sources.