On Mon, May 16, 2011 at 11:24 PM, eyal edri <[email protected]> wrote: > Hi, > > Is there a way to skip a single junit test while running from command line > (without changing the java code or pom.xml?) > > mvn install -DskipTests -> this will work for all tests > > so something like mvn install -DskipTests='path/to/test/Test.java' to > ignore a single one... ?
Kind of, http://maven.apache.org/plugins/maven-surefire-plugin/examples/single-test.html mvn -Dtest=TestSquare,TestCi*le test But that would require you to craft an expression that included every test BUT the one you wanted. Which is unlikely to be possible. Why are you trying to skip one test? Why not fix the code so it works, or disable the test in the code, or use http://maven.apache.org/plugins/maven-surefire-plugin/test-mojo.html#testFailureIgnore to ignore the fact that the test is failing. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
