Thanks Wendy.  Unfortunately svn.apache.org is timing out.  I did come
across one of your earlier posts, so I now understand <executions>
better.  Base on one of your posts, I tried the following w/o success.

<executions>
 <!-- skip unit test run, tests to be executed during integration-test
-->
 <execution>
   <id>surefire-unit</id>
   <phase>test</phase>
   <goals>
     <goal>test</goal>
   </goals>
   <configuration>
     <excludes>
       <exclude>**/*.java</exclude>
     </excludes>
     <!-- naturally this doesn't work either:
     <skip>true</skip>
     -->
   </configuration>
 </execution>
 <execution>
   <id>surefire-it</id>
   <phase>integration-test</phase>
   <goals>
     <goal>test</goal>
   </goals>
   <configuration>
     <includes>
       <include>**/*.java</include>
     </includes>
   </configuration>
 </execution>
</executions>

I admit we're bending Maven a bit.  Actually, the entire module is a
test project.  ;-)

-Chris

-----Original Message-----
From: Wendy Smoak [mailto:[EMAIL PROTECTED] 
Sent: July 27, 2006 5:23 PM
To: Maven Users List
Subject: Re: maven-surefire-plugin - turn off for "test", turn on for
"integration-test"?

On 7/27/06, Chris Wall <[EMAIL PROTECTED]> wrote:

> I would like to turn off maven-surefire-plugin during the "test" phase
> (so, no unit testing at all), and turn on maven-surefire-plugin for
the
> "integration-test".  Basically my source is a test webapp, and my
tests
> are integration tests.

The usual advice is to put your integration tests in a separate
module, and bind executions of the compiler and surefire to the right
phases.  Here's an example of that:
 
http://svn.apache.org/repos/asf/struts/struts1/trunk/integration/apps-it
/pom.xml
(There are much better examples in the Better Builds with Maven book
from Mergere.)

Check the archives for some of my recent posts (2-3 months).  I got
some help configuring the Shale Framework examples webapps, where we
needed to keep the integration tests in the same module as the example
app and its unit tests.

Here's one of those poms:
http://svn.apache.org/repos/asf/shale/framework/trunk/shale-apps/shale-b
lank/pom.xml

Along those lines, for your project, try letting Surefire run during
'test', but excluding all of the test classes.  Then bind a second
execution of surefire to the integration-test phase.  (Based on the
Shale example, you might have to explicitly <include> the test
classes.)

HTH,
-- 
Wendy

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

_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.

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

Reply via email to