Hi all,
I posted this to stackoverflow - http://stackoverflow.com/questions/30434421/gradle-eclipse-multiproject-how-to-not-export-provided-jars-that-are-depend, though the comment from Andreas is that it works for him. Since his feedback I created a github project with a minimal example in that post ( https://github.com/oehm-smith/gradleMultiprojectProvided ) and it doesn’t work for me. I’m hoping someone else can try it.
In summary, the README.md:
Gradle Multiproject with a Provided scope / configuration. Running war from the CL creates a .war with no jars marked with ‘provided’. But run Eclipse > Run On Tomcat and the provided and test jars go to webinf/lib.
- cd master
- gradle war
- jar tvf …/apir/build/libs/apir.war | grep jar
- Observe no ‘tomcat’ jars are in the war
Now do in Eclipse:
- In Eclipse with Gradle plugin … right-click > import > gradle and select the master project > build > select > ok
- Choose ‘apir’ project > right-click > run on server > piviol tc S rver is fine
- Choose 'pivotal tc Server ’ > Browse Deployme3t Location
- Observe there ARE ‘tomcat’ jars in the wtpwebapps/apir/WEB-INF/lib directory
Lastly I would like feedback on how to debug this problem. In the github project you will see I print out configurations.provided
and some information for eclipse.classpath.noExportConfigurations
but need to see more for noExportConfigurations
and I don’t know how. What about debug to see the inner-workings of the eclipse-wtp
plugin?
Looking through the gradle issues this seems to be an instance of https://issues.gradle.org/browse/GRADLE-2396 (i tried to add that tag but it doesn’t exist)