JCgH4164838Gh792C124B5 commented on a change in pull request #147: URL: https://github.com/apache/struts-site/pull/147#discussion_r460445631
########## 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 Review comment: The reference is to the original Struts 2.0 release, could be updated to a newer one like `struts2-core-2.5.24-SNAPSHOT.jar`. (meant to have been part of the review ... oops). ---------------------------------------------------------------- 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