问题
I am running Eclipse Luna on OS X 10.10.2. I have a project, which has somewhat recently had a Maven nature introduced. How can I configure a particular JUnit run configuration Classpath so that it uses the enclosing project's "default classpath" instead of Maven Dependencies? Every time I try to define or update (via "Restore Default Entries") the JUnit run classpath configuration, an empty project entry is added, then an empty Maven Dependencies entry, as illustrated by this screenshot.
What I want is to not use Maven Dependencies, but rather just the default project classpath, which would be configured normally for this type of run configuration, as illustrated by this screenshot.
I have tried disabling the Maven project nature entirely, to no avail (the blank Maven Dependencies are still added). I have also tried, to no avail, to find the IDE option to add project with default classpath, but perhaps that is what the "Restore Default Entries" button is supposed to do.
How can I force the JUnit run configuration to not use Maven Dependencies, but instead simply the default project classpath?
来源:https://stackoverflow.com/questions/28954222/how-to-force-eclipse-junit-run-configuration-to-use-project-default-classpath