Hi Wendy,
You may configure your "db-live" profile in your pom as follows:
<project>
[...]
<profiles>
<profile>
<id>db-live</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
[...]
</project>
But then again, in order to trigger it you still have to specify it in
the command line, as such:
mvn <command> -Pdb-live
which you may likely forget as well :-).
But at least this is far easier to remember ;-)
You may refer to
http://maven.apache.org/guides/introduction/introduction-to-profiles.html
for more info about profiles in maven.
Hope this helps.
-Lester
Wendy Smoak wrote:
What's the easiest/best way to ensure that when a certain profile is
enabled, the tests are *not* run?
(I have tests that are fine to run against the development and test
instances of the database, but which shouldn't be run when the
"db-live" profile is active.)
-Dmaven.test.skip=true works, but I'm likely to forget. Right now I'm
configuring the Surefire plugin to exclude all of the tests. Is there
a way to convince Surefire not to run at all for a particular profile?
Thanks,
Wendy
---------------------------------------------------------------------
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]