RE: maven-surefire-plugin - turn off for test, turn on forintegration-test?

2006-07-28 Thread Chris Wall
I sure will.  Thanks Wendy.

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

On 7/27/06, Chris Wall [EMAIL PROTECTED] wrote:
 Goodness me.

 This...
...
 Works!

 Thanks everyone!

Would you consider writing up what you've discovered for the wiki?
Here's an 'Examples' page where it might fit:
http://docs.codehaus.org/display/MAVENUSER/Examples

(If by chance you don't have permission to edit, ask on [EMAIL PROTECTED])

Thanks,
-- 
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]



RE: maven-surefire-plugin - turn off for test, turn on forintegration-test?

2006-07-27 Thread Chris Wall
Thanks Simon.

Based on your recommendation I made the following update.  Yet, the
execution element's skip=false is not overriding the parent value.  Both
the unit test and integration test executions are being skipped.

What am I missing?  Thanks.

Plugin def:

!-- skip unit test run, tests to be executed during integration-test
--
plugin
  groupIdorg.apache.maven.plugins/groupId
  artifactIdmaven-surefire-plugin/artifactId
  configuration
skiptrue/skip
  /configuration
  executions
execution
  idsurefire-it/id
  phaseintegration-test/phase
  goals
goaltest/goal
  /goals
  configuration
configuration
  skipfalse/skip
/configuration
  /configuration
/execution
  /executions
/plugin

Result:

[INFO] Scanning for projects...
[INFO]


[INFO] Building TOM Test WebApp
[INFO]task-segment: [clean, clean, integration-test]
[INFO]


[INFO] [clean:clean]
...
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
...
[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:testCompile]
...
[INFO] [surefire:test]
[INFO] Tests are skipped.
[INFO] [war:war]
[INFO] Exploding webapp...
...
[INFO] [surefire:test {execution: surefire-it}]
[INFO] Tests are skipped.
[INFO]

[INFO] BUILD SUCCESSFUL


-Chris

-Original Message-
From: Simon Kitching [mailto:[EMAIL PROTECTED] 
Sent: July 27, 2006 5:59 PM
To: Maven Users List
Subject: RE: maven-surefire-plugin - turn off for test, turn on
forintegration-test?

Hi Chris,

I don't think it's bending maven to run two lots of unit tests,
normal and integration.

An executions section defines invocations of the specified plugin *in
addition* to the standard one. If you want to skip the standard run, or
restrict the set of classes it runs, then do that inside the
configuration section of the plugin main block, not the executions
section:

  plugin
artifactIdmaven-surefire-plugin/artifactId
...
configurationskiptrue/skip/configuration
executions
  execution
 ...
 skipfalse/skip

Because the additional execution inherits settings from the main one,
you need to reset skip to false in the nested definition. Using excludes
will work in the same manner.

Regards,

Simon

On Thu, 2006-07-27 at 15:52 -0700, Chris Wall wrote:
 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
idsurefire-unit/id
phasetest/phase
goals
  goaltest/goal
/goals
configuration
  excludes
exclude**/*.java/exclude
  /excludes
  !-- naturally this doesn't work either:
  skiptrue/skip
  --
/configuration
  /execution
  execution
idsurefire-it/id
phaseintegration-test/phase
goals
  goaltest/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

Re: maven-surefire-plugin - turn off for test, turn on forintegration-test?

2006-07-27 Thread Wendy Smoak

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


Based on your recommendation I made the following update.  Yet, the
execution element's skip=false is not overriding the parent value.  Both
the unit test and integration test executions are being skipped.


That fits with what I (vaguely) remember happening.  I think you
either have to let Surefire run in 'test' and do the
includes/excludes, or else switch to pom packaging and bind executions
of the various plugins exactly where you want them.

--
Wendy

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



RE: maven-surefire-plugin - turn off for test, turn on forintegration-test?

2006-07-27 Thread Chris Wall
Goodness me.

This...

execution
  idsurefire-it/id
  phaseintegration-test/phase
  goals
goaltest/goal
  /goals
  configuration
configuration
  skipfalse/skip
/configuration
  /configuration
/execution

...should be (note extra configuration stanza)...

execution
  idsurefire-it/id
  phaseintegration-test/phase
  goals
goaltest/goal
  /goals
  configuration
skipfalse/skip
  /configuration
/execution

Works!

Thanks everyone!

-Chris

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

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

 Based on your recommendation I made the following update.  Yet, the
 execution element's skip=false is not overriding the parent value.
Both
 the unit test and integration test executions are being skipped.

That fits with what I (vaguely) remember happening.  I think you
either have to let Surefire run in 'test' and do the
includes/excludes, or else switch to pom packaging and bind executions
of the various plugins exactly where you want them.

-- 
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]



Re: maven-surefire-plugin - turn off for test, turn on forintegration-test?

2006-07-27 Thread Wendy Smoak

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

Goodness me.

This...

...

Works!

Thanks everyone!


Would you consider writing up what you've discovered for the wiki?
Here's an 'Examples' page where it might fit:
http://docs.codehaus.org/display/MAVENUSER/Examples

(If by chance you don't have permission to edit, ask on [EMAIL PROTECTED])

Thanks,
--
Wendy

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