Could someone please explain Example 52.7 in the Gradle documentation?


(Allen George) #1

The example is as follows:

[installer, deployer]*.pom*.whenConfigured {pom ->
    pom.dependencies.find {dep -> dep.groupId == 'group3' && dep.artifactId == 'runtime' }.optional = true
}

What are “installer” and “deployer”? Where are they defined/sourced from?

Also, FWIW, I was unable to get the example working (I’m sure I’m doing something wrong!) My gradle build fails with:

“> Could not find property ‘installer’ on project ‘:libraft-agent’.”

The error message is explanatory but unhelpful since I don’t know what “installer” and “deployer” are.


(Luke Daley) #2

It’s a bit confusing because it’s a snippet pulled from this sample: https://github.com/gradle/gradle/blob/master/subprojects/docs/src/samples/maven/pomGeneration/build.gradle