The Jackrabbit TCK unit tests already incorporate a mechanism to "ignore" a set of tests, and it doesn't require changing the source code (which is actually pretty nice).
In the POM file (of whatever Maven module where the TCK tests are run), we simply need to define a "known.issues" property in the Surefire configuration, such as the following:
The value of the property needs to be the fully qualified name of the test case. They can be selectively overridden on the Maven command line without touching the pom.xml file, using:
which supports support this format for identifying test cases:
Running the test cases from an IDE may still fail if the system property is not set. Not sure if the Maven integration will properly set the system properties. (This is a significant disadvantage of this approach over what we have now.)
Note that this works not by skipping the test but instead by ignoring the failure in org.apache.jackrabbit.test.JCRTestResult.
(See http://jackrabbit.510166.n4.nabble.com/skip-test-cases-for-known-issues-td529649.html for the original discussion of how this works within the TCK test suite.)