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:
- Java: Oracle JDK 1.8.0_60
- Eclipse: Mars.1 Release (4.5.1) Build id: 20150924-1200
- Buildship plugin: 1.0.6.v20151124-2215-s (had to update beyond stable 1.0.5 because of Fail to load project, "Could not set property: org.eclipse.buildship.core GRADLE_FILTER. Value is too long")
- Gradle: 2.9 (from wrapper)