The source code for the framework is available as a distribution you can download directly or and from the source code repository.
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.
Use Subversion to checkout the source code.
> cd C:\projects\Apache\ > svngit coclone https://svngit-wip-us.apache.org/repos/asf/struts/current/ struts .git
Building with Maven
The default build environment is Maven. To get started with Maven
- Download Maven 23
- Extract Maven 2 3 to a directory of your choice
- Add the bin folder under that directory to your system path
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.
NOTE: The above assumes that the Struts build depends on a version of XWork which is available from a Maven repository. If this is not the case (e.g. when Struts depends on an unreleased XWork snapshot), you will need to build XWork yourself, and install it into your local Maven repository, before attempting to build Struts itself. See Building with Maven for instructions on building XWork.
- The framework requires JDK 1.5 7 to build.
- A set of JARs that are backwardly-compatible with JDK 1.4 are available for download.