How do I prevent the cleaning of the workspace used for Maven tycho surefire tests?

36 Views Asked by At

We have an Eclipse plugin and are using maven tycho to build it. I've now created a seperate project with unit tests and run those in the integration-test phase while building the plugin - all good. But to properly test the plugin it has to be used in a special workspace in the eclipse instance.

I don't know how I can change the workspace or prevent the workspace from gettin cleaned each time the integration-test phase begins. Currently a new workspace is created under project/target/work/data right before the test starts.

I tried to copy the workspace that I want to use in the pre-integration-test phase and even in the integration-test phase itself, but it is still cleared as soon as the actual test starts. How can I prevent the cleaning of the workspace for my plugin tests?

1

There are 1 best solutions below

0
R M On

Found it, just set the property to false in the configuration of the tycho-surefire:test plugin.

Found it here: https://tycho.eclipseprojects.io/doc/latest/tycho-surefire-plugin/test-mojo.html#deleteOsgiDataDirectory