简体   繁体   English

如何在本地和远程仓库中发布Grails插件

[英]How to publish a Grails plugin locally and to a remote repo

I'm building both a Grails app as well as a plugin that the app will use as a dependency. 我正在构建Grails应用程序以及该应用程序将用作依赖项的插件。 I need a way to make changes to the plugin, publish it locally, build the app (using the new version of the plugin - SNAPSHOT) and then do a grails run-app to pick up all the changes. 我需要一种方法来更改插件,在本地发布,构建应用程序(使用新版本的插件SNAPSHOT),然后执行grails run-app以获取所有更改。

I also need a way to publish the plugin to a remote Artifactory repo and have the Grails app pick up the "release" (non-SNAPSHOT) version of the plugin. 我还需要一种将插件发布到远程Artifactory仓库的方法,并让Grails应用程序选择插件的“发行”(非SNAPSHOT)版本。 Any ideas as to how I could accomplish this? 关于如何实现此目标的任何想法?

While the plugin is under development, make it a local plugin , so that you don't have to redeploy to a repo after every change. 在开发插件时 ,请将其设置为本地插件 ,这样您就不必在每次更改后都重新部署到存储库。 For example, for a plugin named 'shiro' whose source code is at /dev/plugins/grails-shiro , add the following to Config.groovy 例如,对于源代码位于/dev/plugins/grails-shiro名为“ shiro”的/dev/plugins/grails-shiro ,请将以下内容添加到Config.groovy

grails.plugin.location.shiro = "/dev/plugins/grails-shiro"

When a version of the plugin is ready to be released, use the release plugin to deploy it to a remote repo. 当准备发布某个版本的插件时,请使用release插件将其部署到远程存储库。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM