On Mon, May 16, 2011 at 11:24 PM, eyal edri <
[hidden email]> 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.htmlmvn -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#testFailureIgnoreto ignore the fact that the test is failing.
---------------------------------------------------------------------
To unsubscribe, e-mail:
[hidden email]
For additional commands, e-mail:
[hidden email]