Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Struts Wiki" for change 
notification.

The following page has been changed by WendySmoak:
http://wiki.apache.org/struts/StrutsMaintenanceMaven

------------------------------------------------------------------------------
  
  Download and install Maven 2 from http://maven.apache.org.
  
- Maven 2 does not use .properties files.  Per-developer and per-system 
configuration is done in '''~/.m2/settings.xml'''.  (Where '~' represents the 
user's home directory.)  For more information, refer to the 
[http://maven.apache.org/maven-settings/settings.html settings model].
+ Maven 2 does not use .properties files.  Per-developer and per-system 
configuration is done in '''~/.m2/settings.xml'''.  (Where '~' represents the 
user's home directory.)  For more information, refer to the 
[http://maven.apache.org/maven-settings/settings.html settings model] and the 
Suggested Settings section below.
  
  == 2. Checkout Source from Subversion ==
  
@@ -22, +22 @@

  == 3. Building with Maven ==
  
  === 3.1 Local Install ===
- To build and install all of the artifacts (jar and war files) in your local 
Maven repository:
+ To build and install all of the artifacts (pom, jar, and war files) in your 
local Maven repository:
  {{{
     ~/svn/struts/current/action
     $ mvn
@@ -30, +30 @@

  
  (The default goal, configured in action/pom.xml is '''install'''.)
  
+ To clean up, which will delete all of the 'target' directories:
+ {{{
+    $ mvn clean
+ }}}
+ 
  === 3.2 Binary and Source Assembly ===
  To build the -all assembly, first enable the 'pre-assembly' profile, which 
will cause the javadoc and source artifacts to be produced:
  {{{
@@ -41, +46 @@

     ~/svn/struts/current/action/assembly
     $ mvn assembly:assembly
  }}}
+ 
  The output will be in 'assembly/target/assembly/out'.
  
+ '''NOTE:''' The 'assembly:assembly' goal must be run from action/assembly.  
Somehow, this needs to be coordinated with release:prepare and release:perform, 
so that the assembly will contain the same jars that were just deployed to the 
repository.
+ 
+ 
  === 3.3 Source Assembly ===
  
   * The -sources jars are included in struts-action-x.x.x-all.[zip|tar.gz].
@@ -53, +62 @@

  
  The Maven 2 
[http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html 
build lifecycle] includes a phase for integration testing.  Currently, a module 
may contain only unit tests ''or'' integration tests, but not both.  See the 
[http://docs.codehaus.org/display/MAVEN/best+practices+-+testing+strategies 
testing strategies] page for discussion and proposals.
  
- Integration tests for Struts Action are located under the '''integration''' 
module.  This module is not linked from action/pom.xml, so the integration 
tests will not run as part of the master build.  Until Maven's support for 
integration testing improves, they should be run separately.  Another option 
would be to link this module in, and activate the tests using a profile.
+ Integration tests for Struts Action are located under the '''integration''' 
module.  Integration tests will only be run if the ''perform-itest'' profile is 
enabled.
  
- The Cactus tests for Struts Taglib are located in the 
action/integration/taglib-it module.  To run the tests, you must provide a 
value for the 'cargo.tomcat5x.home' System property.  This may be done on the 
command line:
+ The Cactus tests for Struts Taglib are located in the 
action/integration/taglib-it module.  To run the tests, you must provide a 
value for the 'cargo.tomcat5x.home' System property, for example:
  {{{ 
     ~/svn/struts/current/action/integration
-    $ mvn -Dcargo.tomcat5x.home=c:/java/apache-tomcat-5.5.16 
+    $ mvn -P perform-itest -Dcargo.tomcat5x.home=c:/java/apache-tomcat-5.5.16 
  }}}
- or in settings.xml:
- {{{
  
+ (This will run the default '''install''' goal which includes the 
'''integration-test''' phase.)
+ 
+ See the Suggested Settings section below for information on configuring the 
'cargo.tomcat5x.home' System property in your settings.xml file, so that you 
don't have to specify it on the command line.
+ 
+ There is no Cactus plugin for Maven 2, so 
+  * The Struts Taglib testing webapp is manually configured for Cactus with 
extra information in web.xml, and a jspRedirector.jsp file in the root 
directory.  
+  * Executions of the Surefire, Compiler, War, and Cargo plugins are bound to 
various lifecycle phases
+ 
+ '''NOTE:''' If the tests fail, Cargo will not be able to stop the container.
+ 
+ == 5. Suggested Settings ==
+ 
+ ~/.m2/settings.xml
+ 
+ {{{
  <settings>
  ...
+     <servers>
+     ...
+        <server>
+           <id>apache-maven-releases</id>
+           <username>yourid</username>
+           <privateKey>/path/to/private/key</privateKey>
+        </server>
+        <server>
+           <id>apache-maven-snapshots</id>
+           <username>yourid</username>
+           <privateKey>/path/to/private/key</privateKey>
+        </server>
+        <server>
+           <id>apache-maven-test-builds</id>
+           <username>yourid</username>
+           <privateKey>/path/to/private/key</privateKey>
+        </server>
+     </servers>
+ 
-     <profiles>
+    <profiles>
      ...
       <profile>
          <id>cargo-config</id>
@@ -83, +124 @@

  </settings>
  }}}
  
- Then run the tests with '''mvn integration-test''' or simply '''mvn'''.  
(This will run the default '''install''' goal which includes integration-test.)
  
- There is no Cactus plugin for Maven 2, so 
-  * The Struts Taglib testing webapp is manually configured for Cactus with 
extra information in web.xml, and a jspRedirector.jsp file in the root 
directory.  
-  * Executions of the Surefire, Compiler, War, and Cargo plugins are bound to 
various lifecycle phases
- 
- '''NOTE:''' If the tests fail, Cargo will not be able to stop the container.
- 
- == 5. References ==
+ == 6. References ==
   * [http://www.developer.com/open/article.php/10930_3552026_2 This article] 
provides a good introduction to Maven 2 and lists some other useful goals.
  
  -----
  
- The information below refers to the Maven 1 build, which is scheduled to be 
removed in mid-April.
+ = The information below refers to the Maven 1 build, which is scheduled to be 
removed in mid-April. =
  
  == 1. Maven Setup ==
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to