Apache Struts 2 Documentation > Home > Guides > Contributors Guide > Building the Framework from Source |

Apache Struts 2 Documentation
Building the Framework from Source
Edit Page Browse Space Add Page Add News
Added by digi9ten, last edited by James Mitchell on Dec 06, 2006 (view change) show comment hide comment
Comment: A few minor tweaks for clarity
View page history

## Why Build?

Most developers will never need to build the framework from source. The distribution package contains everything a developer needs to get started and become productive with the framework. For more on how to go to work with the distributed binaries right away, see Ready, Set, Go!. However, there are situations when someone will want to build the framework from scratch. You may want to try out new tweaks and patches, or you might want to try writing your own tweak or patch.

| If you just want to use the latest development build, perhaps because a patch you need has been applied, you can also download a nightly build.

## Getting the Sources

The source code for the framework is available as distribution you can download directly or from the source code repository.

### Distribution

The distributions of the framework contain all sources, as well as all needed libraries for building JARs and running. Distributions can be downloaded from the Apache Struts project.

## Respository (SVN)

Use Subversion to checkout the source code.

    > cd C:\projects\Apache\
    > svn co https://svn.apache.org/repos/asf/struts/current/ struts

## Building with Maven

The default build environment is Maven. To get started with Maven

- Download Maven 2
- Extract Maven 2 to a directory of your choice
  - (e.g. `\opt\Apache\Maven\maven-2.0.4`)
- Add the bin folder under that directory to your system path
  - (e.g. `PATH=%PATH%;C:\opt\Apache\Maven\maven-2.0.4`)

Change to your framework home directory (e.g. `C:\projects\Apache\struts\struts2`) and run

    > cd C:\projects\Apache\struts\struts2\
    > mvn clean install -Pall

That will take care of the basic maven build. There is a bunch more that you can do. Checkout out Building with Maven for more information.

## JDK/JRE Compatibility

- The framework requires JDK 1.5 to build.
- A set of JARs that are backwardly-compatible with JDK 1.4 are available for download.

## Next: Documentation Style Guide

Children Show Children Hide Children
Building with Maven (Apache Struts 2 Documentation)