I’ve run into an small problem with a multi project build where transitive testCompile dependencies make it into the deployed artifact for a war project has a compile dependency on another project which has testCompile dependencies.
When deployed to a TomEE server or exported as a war file the testCompile dependencies get loaded into the war file as well.
I’ve been trying to figure out how to configure the eclipse plugin so that these transitive test dependencies don’t get deployed along with the needed compile dependencies.
I’ve created a sample project which replicates the issue here - https://docs.google.com/file/d/0B2kcDxmenZW5dGt4ZGUxWlQ5Q3M/edit?usp=sharing
First time I’ve had to share a file on a forum so if you can’t access it let me know where you would like it.
I imported the projects into eclipse as Gradle projects, performed a clean build, exported the war project and then checked the WEB-INF/lib of the exported war to verify that the testCompile dependencies were there.
I encountered this issue as part of a larger project where the deployment to TomEE caused an error because the test tomcat jars were being included in the application classloader which was interfering with the normal startup of the app.
If there’s anything else I can provide or any questions I can answer please let me know.