Versions Compared

Key

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

...

Code Block
titleOffline Mode
mvn -o -Pextras,plugins,xwork

OutOfMemoryError

If you get an OutOfMemoryError while running the tests:

...

Code Block
titleSkip Tests
mvn -Dmaven.test.skip=true -Pextras,plugins,xwork

Of course, if you find tests are failing, please submit a patch to fix them!

...

The solution is to clear out any stale XWork 2 jars in your local Maven repository, usually by removing the directory ~/.m2/repository/opensymphony. This will force the Struts Maven build to pull down a fresh copy of XWork and hopefully resolve your problem.

Creating a release

Maven terms a release build an "assembly". An assembly aggregates the builds of all the modules installed locally on your machine into one or more release files. The default profile for building Struts 2 includes an assembly that attempts to download a mirror of the wiki. This can be time-consuming, to disable the assembly module just add -DskipAssembly to your maven command line.

To create a release, you must first build and install locally every artifact. From the root struts2 directory, run:

Code Block
titleBuilding all modules

mvn -Pextras,apps,plugins install

Next, you need to run the assembly build to create the release files. From the struts2/assembly directory, run:

Code Block
titleBuilding the assembly

mvn assembly:assembly

If the assembly built correctly, you should see the release files in the target/assembly/out directory.

Mirrors

The default mirror for Maven builds ("ibiblio") can be slow and unreliable. Maven lets you specify alternative mirrors so that you don't have to depend on ibiblio for everything.

...