Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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.

Building with Ant

As and for an alternative, you can also build the framework using Ant and Ivy.

What is Ant

Ant is the defacto standard build tool for Java project. If you don't have Ant installed, it's each to download and setup. As with Maven, you can extract the Ant distribution to the folder of your choice, and then add the bin folder to your system path.

What is Ivy?

If you checked out the sources from the repository, you might have noticed that the lib directory is empty. Unfortunately this does not mean that the framework has no external dependecies. As a full featured MVC framework, it has lots and lots of dependencies. Of course, this means that there has to be some kind of dependency management.

Ivy is a free Java based dependency manager, with powerful features such as transitive dependencies, Maven repository compatibility, continuous integration, HTML reports and many more. Ivy is fully integrated with Ant, which many developers already use.

Note
titleSkipping dependency resolution

The build now knows the property "skip.ivy". This may be specified from build.properties file or from a command line ant execution with -Dskip.ivy=true. If set, dependency resolution via Ivy is omitted and build is done with current jars found in lib directory. This behaviour is turned on by default for builds from the distribution package.

JUnit and Clover

The full Ant build process will require JUnit and Clover.

  • Place a copy of junit.jar (>= 3.8.1) and clover.jar (>= 1.3.9) into your $ANT_HOME/lib directory (if not already exists).
    • If you don't have these jars at hand, look in the lib/build directory of your Struts module after you called ant init in the step before...
  • Our Clover license is found in the common directory of the struts module. Place the clover-license.jar into your $ANT_HOME/lib directory as well.

Now you are ready to ...

Build It

From the root of your project folder

Code Block

> ant

JDK/JRE Compatibility

  • The framework requires JDK 1.4.2+ 5 to build. JDK 5.0 is not required for building.Action2-based applications require JRE 1.4.2+ to run. JRE 5.0 is not required to run unless your application uses the optional xwork-tiger module, which adds some Java 5.0 specific features to the framework.
  • A set of JARs that are backwardly-compatible with JDK 1.4 are available for download. InfoJava 5 with Java 1.4 backward compatibility is being considered for Struts 2

Next: Documentation Style Guide