How to add plugin dependencies to pom.xml

允我心安 提交于 2019-12-11 02:55:02

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!