On Jan 15, 2009, at 7:09 AM, Eric Rotick wrote:

So, the first question is, is this use of profiles correct? I can see that
primary purpose of profiles is to set up, well profiles, of different
scenarios for the build. In this respect the use of profiles for specific tests falls loosely into this category. However, the use of profiles to
perform a kind of macro or script does not seem correct.

This sounds like the same question I had in this thread:

http://mail-archives.apache.org/mod_mbox/maven-users/200812.mbox/%3c9bbf0d0d-1db8-4e6d-8bb0-fb8d0939c...@vocaro.com%3e

The ideal solution is to write your own custom test plugin, "mytest" or whatever. You can then invoke it directly, like this:

  mvn mytest:test1
  mvn mytest:test2
  ...

Or you can bind it to a phase and have it run automatically.

Of course, writing your own plugin involves extra work and maintenance, so as an alternative you can simply put your test invocation code into a profile and simply enable that profile as needed. This is not kosher, as you point out, but it's an acceptable workaround for test scenarios. At least, this is my conclusion based on the responses in the thread.

Trevor


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to