How to run a single test case in maven 2.

A single test can be run by using the following command, where classname should be replaced by the name of the class.

mvn test -Dtest=[classname]

For instance, to run the FixedConeClustererTest, use this command.

mvn test -Dtest=FixedConeClustererTest

If you encounter a BUILD FAILURE with this command, please try the following

mvn test -Dtest=FixedConeClustererTest -DfailIfNoTests=false