I asked this question to be able to kick sets of a project's Cucumber tests on Jenkins off selectively, without really knowing what their RunTests classes would be called, what their CucumberOptions would contain, or where they would be located. I found a few helpful threads on StackOverflow in the meantime, which answer my question:
Using those, I can kick my Cucumber tests off individually as follows:
First, I used the maven assembly plugin to get the tests packaged in a jar:
https://stackoverflow.com/a/574650/2018047
Then I copied the tests' dependencies to the target folder on Jenkins, as shown here:
https://stackoverflow.com/a/23986765/2018047
We already have a flag that skips the execution of our tests when it's set, so I package my tests without running them:
mvn clean install -DskipMyTestModule=true
And using the code from above and the invocation from below, I'll be able to make it all work...
java -Dcucumber.options="src/test/resources/features --tags @b --format pretty:STDOUT --format html:target/cucumber-b --format json:target/cucumber-b.json" -Dname=value -cp target/artifact-1.2.8-SNAPSHOT-tests.jar;target/test-classes/libs/junit-4.11.jar;target/test-classes/libs/* org.junit.runner.JUnitCore com.example.foo.bar.test.cucumber.RunTest
Hope this helps someone in the future. :)