All provided dependencies appear unexpectedly in default configuration


I have a big multi-module project which generates three different war files. I also implemented a lot acceptance tests in a test project which has all the “default” configurations of the three “war” projects as dependency.

Unfortunately, I get a “NoClassDefFoundError” for every test because of some classpath problems. Finally, I could find out that this happens because some of the “providedCompile” dependencies makes their way into “testRuntime” configuration via “war” projects default configuration.

Edit: More concrete we have a different Xerces (and JaxWs) version we have to deal with, as our application servers have to use different ones to the JDK included ones. And locally I want just stick to JDK one …

As the “providedCompile” dependencies are not included into the resulting “project.war” file, I would expect to do not have them included in “default” configuration as well. (Note: Some happens with “providedRuntime”).

In my point of view this is a bug and I could find any StackOverflow topic, JIRA issue or Gradle forum thread on that. What do you thing?

Kind regards, Andreas