Do you know of any example of using the 'exec plugin from the test phase in
the POM '?

Currently the workaround I have found is to use the GMaven plugin that
deletes the DB.  However I don't have known control over when this runs...it
just happens to work at the moment.

BTW, do non-lifecyle bound plugins run in order they are specified in the
pom?

-Dave

On Thu, Sep 3, 2009 at 11:40 PM, Brett Porter <[email protected]> wrote:

> On 04/09/2009, at 3:35 PM, David Hoffer wrote:
>
>  During the setup for the test, actually I do this in the @BeforeClass
>> because its expensive, we make some calls into legacy code that creates db
>> connections.  I need to delete the access db after the test but can't
>> because the db connections still exist.
>>
>> So ideally I need some (tearDown) process to come along after each test
>> and
>> do a cleanup.  Doing this in the AfterClass would be fine but I can't get
>> it
>> to work...it seems to be the same process as the tests.
>>
>
> It is.
>
> I think your best alternative is to delete the database using the exec
> plugin from the test phase in the POM (which will run after the surefire
> tests have concluded). It also means you don't need to fork multiple JVMs
> for your tests if you don't want to.
>
> - Brett
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to