> -----Original Message-----
> From: Wendy Smoak [mailto:[EMAIL PROTECTED]
> Sent: mardi 6 juin 2006 19:53
> To: Maven Users List
> Subject: [m2] Moving Surefire execution from test to integration-test
> 
> The Maven webapp archetype creates a structure with only
> src/main/webapp and src/main/resources.  It would seem, then, that we
> could put integration tests in this module, and not run into the
> problem of having both normal JUnit tests and integration tests in the
> same module.

I would put functional tests in a separate module. It's much cleaner and in
any case in order to run functional tests you need to have several
prerequisites:

- the WAR/EAR/etc is built (i.e. the corresponding module is built)
- the database is built and setup
- you need environment data applied (to your container config + possibly to
your WAR/EAR). Note that you'll usually want to store your container config
under a module so that it's version-controlled and managed.

Thus the general way I'd recommend is to have several modules. A WAR is only
a component but to execute it you need an application. An application is a
container + a configuration for the environment + the WAR/EAR/etc. This
requires several modules to achieve it.

That said, putting everything in one module could probably work for the
simple cases but right now it isn't possible with m2.

> To do this, I need to convince Surefire *not* to run during the test
> phase, but instead to run during integration-test, (preferably only
> when a profile is enabled.)
> 
> Is there a way?  

I don't think so. What you can do is bind it to the integration-test phase
in an execution (see last section of the j2ee chapter in the m2 book).

> If I configure <skip>true</skip>, then *all* of my
> executions get skipped. :(

-Vincent


        

        
                
___________________________________________________________________________ 
Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son 
interface révolutionnaire.
http://fr.mail.yahoo.com

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

Reply via email to