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

The comment on the change is:
Added notes on integration testing

------------------------------------------------------------------------------
  == 1. Maven Setup ==
  
  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].
  
  == 2. Checkout Source from Subversion ==
  
@@ -47, +49 @@

  
   * Wait for v2.1 of maven-assembly-plugin, then switch to the 
action/assembly/src/main/assembly/src.xml and dep.xml descriptors for separate 
-bin and -src assemblies.
  
+ === 4. Integration Testing ===
+ 
+ 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.
+ 
+ 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:
+ {{{ 
+    ~/svn/struts/current/action/integration
+    $ mvn -Dcargo.tomcat5x.home=c:/java/apache-tomcat-5.5.16 
+ }}}
+ or in settings.xml:
+ {{{
+ 
+ <settings>
+ ...
+     <profiles>
+     ...
+      <profile>
+         <id>cargo-config</id>
+          <properties>
+             
<cargo.tomcat5x.home>c:/java/apache-tomcat-5.5.16</cargo.tomcat5x.home>
+             
<cargo.tomcat4x.home>c:/java/jakarta-tomcat-4.1.31</cargo.tomcat4x.home>
+          </properties>
+       </profile>
+    </profiles>
+ 
+    <activeProfiles>
+       <activeProfile>cargo-config</activeProfile>
+    </activeProfiles>
+ 
+ </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.
+ 
- == 4. References ==
+ == 5. 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.
  
  -----

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

Reply via email to