Grails Plugin dependencies

巧了我就是萌 提交于 2019-12-10 21:38:01

问题


When creating a plugin that depends on other plugins, you specify these dependencies in the config of the plugin via the dependsOn map.

What I want to know is if these plugins are downloaded automatically when you run install-plugin command?? If not, how can it be set up to do so?


回答1:


That's how it works in 1.2 and 1.3. In 2.0 however you'll want to configure dependencies in the plugins section of BuildConfig.groovy since dependsOn doesn't populate the pom file and that's what's used for dependency management in 2.0.

1.3 can also work with dependencies in BuildConfig.groovy, but 1.2 and earlier cannot. I think it's safe to assume that there aren't many users still on 1.2 or earlier, but if you need to support older versions you can just include instructions for them to explicitly install the required dependencies before installing your plugin.



来源:https://stackoverflow.com/questions/8704828/grails-plugin-dependencies

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