In a maven project I have some junit tests where I need to refer to some runtime libraries (the birt runtime) when running the tests:
@Before
public void setup() {
// init osgi/birt rte.
BEngine.getEngine().init("C:\\birt-runtime-2_6_1\\ReportEngine\\");
}
@Test
public void testname() {
// run test that requires the initialization of the above rte.
}
This works fine when running the tests locally from eclipse. My maven project is also build on a linux server running jenkins but currently I disable tests that requires the above runtime libs.
I am considering to copy the runtime libs to the server running hudson and see if I can get hudson to pick up the location of these files when the tests are executed on hudson.
But to do this I need to use the correct location of the rte in the tests.
Any suggestions for doing this? Eg using env variables that can both be understood on windows/linux?