JCgH4164838Gh792C124B5 commented on a change in pull request #147: URL: https://github.com/apache/struts-site/pull/147#discussion_r460444852
########## File path: source/contributors/building-with-maven.md ########## @@ -0,0 +1,206 @@ +--- +layout: default +title: Building with Maven +parent: + title: Contributors Guide + url: index.html +--- + +# Building with Maven +{:.no_toc} + +* Will be replaced with the ToC, excluding a header +{:toc} + +[Maven 3.0.0 or later](http://maven.apache.org) is required to build Struts 2 + +First, let's review some Maven basics. Maven uses the notion of a build _life-cycle_ to which plugins can attach. +Plugins are similar to Ant tasks. When a Maven build is invoked, we specify a point in the life-cycle up to which +the build _should_ proceed. The _compile_ phase comes before _test_ , and _test_ comes before _package_ , and _package_ +comes before _install_ . Once we have Maven setup, we can invoke the Struts build, and specify which phase the build should use. + +## Installing + +The _install_ phase builds up the project ("package"), and installs any JARs it needs into your local repository, e.g.: + +``` +~/.m2/repository +``` + +Once installed, the JARs can be used by any other Maven project you build. The _install_ phase is the **default** phase +if none is specified. + +To run a basic install, change to the root of the source distribution, and enter + +``` +mvn +``` + +That's it! Maven will download any dependencies the build needs; run all unit tests; package up the JARs; then install th +e new JARs locally. For your convenience, copies of the JARs can be found in the _target_ directories of each module. +For example, after the build, the main JAR can found at + +``` +core/target/struts2-core-2.0-SNAPSHOT.jar +``` + +> Sometimes, licensing restrictions prevent Maven from downloading all the JARs that a build might need. For example, +> JavaMail and Activation, can only be downloaded from Sun. When this happens, Maven will display a helpful message +> that explains how to install these JARs manually. After downloading the required JAR, follow the instructions +> to install it to the your local repository. Once installed, the JAR is available to all your Maven builds, not just Struts. + +**Initial Build Successful** + +``` +[INFO] Reactor Summary: Review comment: Similar to the above, the `Reactor Summary` here appears to be for the 2.0.x line. Maybe using a more recent 2.5.x build's summary output could be used instead ? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@struts.apache.org For additional commands, e-mail: dev-h...@struts.apache.org