问题
I have created a plugin which has other plugins as plugin dependencies in BuildConfig.groovy
:
grails.project.dependency.resolution = {
....
plugins {
build(":release:3.0.0",
":rest-client-builder:1.0.3") {
export = false
}
// my dependencies
compile ':spring-security-core:1.2.7.2'
compile ":spring-security-ldap:1.0.6"
}
}
How can I make sure that when someone installs my plugin they don't have to install spring-security-core
and spring-security-ldap
manually? I want dependency management to do it for them.
Grails 2.3.0
回答1:
You've already configured it correctly. The release and rest-client-builder builder plugins won't be installed because they're correctly configured to not be exported, but the security plugins are exported since all dependencies are exported by default.
You can see this by running grails generate-pom
and viewing the generated pom.xml
file. The jar and plugin dependencies are in the <dependencies>
block, and there should be entries in <dependency>
blocks for the "org.grails.plugins" groupId for any transitive plugin dependencies.
来源:https://stackoverflow.com/questions/18995006/how-to-add-plugin-dependencies-to-pom-xml