Skip to content

Commit

Permalink
Corrected the documentation on the 'defaultDependenciesProvided' feature
Browse files Browse the repository at this point in the history
in the dependency DSL. In the example, the 'defaultDependenciesProvided'
line incorrectly came after the 'inherits' line. Now fixed and I added
a note to clarify the importance of the ordering.
  • Loading branch information
pledbrook committed Aug 12, 2010
1 parent 9e560e3 commit 25322a3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/guide/3.7.5 Providing Default Dependencies.gdoc
@@ -1,17 +1,17 @@
Most Grails applications will have runtime dependencies on a lot of jar files that are provided by the Grails framework. These
include libraries like Spring, Sitemesh, Hibernate etc. When a war file is created, all of these dependencies will be included
in the war. An application may choose to have these jar files excluded from the war file. This is useful when the jar files will
in it. But, an application may choose to exclude these jar files from the war. This is useful when the jar files will
be provided by the container, as would normally be the case if multiple Grails applications are deployed to the same container.
The dependency resolution DSL provides a mechanism to express that all of the default dependencies will be provided by the container.
This is done by invoking the @defaultDependenciesProvided@ method and passing @true@ as an argument:

{code}
grails.project.dependency.resolution = {

inherits "global" // inherit Grails' default dependencies

defaultDependenciesProvided true // all of the default dependencies will be "provided" by the container

inherits "global" // inherit Grails' default dependencies

repositories {
grailsHome()
// ...
Expand All @@ -22,4 +22,4 @@ grails.project.dependency.resolution = {
}
{code}


Note that @defaultDependenciesProvided@ must come before @inherits@, otherwise the Grails dependencies will be included in the war.

0 comments on commit 25322a3

Please sign in to comment.