Separate classpaths for run/test/etc.?

Hi,

Our project uses Spring and has unit and scenario tests (located in /src/test/* and /src/scenario/* correspondingly). The problem is our scenario tests override Spring configuration from the main sources - and when you try to run the app from eclipse it surprisingly reads scenario’s configuration from classpath and fails to start. Running from command line works perfectly fine. The only working solution to run from eclipse is to exclude /src/scenario* from the project’s sources…

So the question is, does the Buildship plugin provides the functionality for separation of classpaths (runtime/test/etc.) depending on what you run? As far as I know eclipse doesn’t do that out of the box (merging all the classpaths into one) and it should be supported by a third-party plugin (like it is by m2eclipse plugin for maven projects).
The case above might not be the perfect one, but ideally I’d like my app to be in the same environment when running from eclipse as when running from a command line, i.e. without test classpach mixing with runtime and vice versa…

Did anyone faced the same issues/question and have any info on that?

The configuration is:

1 Like

Currently Buildship merges all project and external dependencies into a single classpath. At the moment we are investigating how to define separate classpaths for different dependency scopes. The bottleneck is that Eclipse JDT supports only one classpath per project. If you are interested you can check you the latest discussion on the topic here.