It's somewhat difficult to follow what you've got set up here. You can set up several distinct executions of the maven-surefire-plugin with different include/exclude patterns for different tests, controlled by profiles, if you really need to.
You can turn test execution on and off entirely with the 'skipTests' parameter. If your problem is that some elaborate tests are, in fact, 'integration' tests, you can use the maven-failsafe-plugin instead of the surefire plugin, and control that separately. If you ask what most people do, I'd venture to say that most people just run all their unit tests all the time. Some people segregate elaborate or time-consuming integration tests in their own projects, since it is less complex to control the build of an entire module than to coordinate and modulate many different executions. On Sat, Jul 9, 2011 at 4:04 PM, Niranjan Rao <[email protected]> wrote: > I am curious to know how do others do their "package" phase or final > builds. > > We have standard profiles for developer, qa and production each > specifying environment specific entries and use resource filtering to > get data in right place. > > When you run package phase, maven runs the unit tests. We don't want > unit tests to be executed on production environment. Only way I know is > to use one of those skip unit tests flags on command line? > > Is this the standard way to package the final output? Is it possible to > run unit tests with different profile and finally package with different > profile? > > Another way I can think of is to run unit tests with qa or other > profile, confirm everything is ok and then run clean/package with > production profile. > > Is there any other way to specify which tests can be executed during > package phase? Sort of like specifying "safe" tests. > > Thanks for help, > > - Niranjan > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
