1
votes

In Gradle war plugin, we could set some dependencies as 'providedCompile' which will tell Gradle to include them only in compile time, not in the packaged .war file. How do we distinguish which dependencies should be as 'providedCompile' or 'compile'? What will happen, if we make every dependency compile or 'providedCompile'?

1

1 Answers

1
votes

The rationale is that "provided stuff" will be made available by the environment in which the application will run. In other words, dependencies with scope providedCompile will be used for compilation but won't be included in the WAR, since they will be provided by the servlet container (e.g., Tomcat) in which the WAR will be deployed.