Different classpath for run and compile

The problem that we have is currently the following: Our project is a multi module project with some dependencies between them. Now one of the modules is used to launch the application (for run/debug). If we now define a dependency between this module and the others the compilation before run/debug works fine but the project fails to run due to the classloader structure. The reason is that the jars from the dependencies are included into the classpath (which makes the application fail due to some classloader issues which are not in our control). If we do not define a dependency the automatic compile before run/debug does not work which is also inconvenient.

Would it be possible to define "Do not include into run/debug classpath" in the module dependencies similar to the "Export" flag there?

Please sign in to leave a comment.