【发布时间】:2015-01-18 14:43:14
【问题描述】:
问题
我有一个自定义插件已成功发布到 Artifactory 中,并且我已通过在下面的 BuildConfig.groovy 中使用以下语法将其成功加载到我的应用程序中。但是,当我对插件进行更改并发布它们时,我想将这些最新更改添加到使用该插件的应用程序中吗?
我认为执行 grails compile 或 grails refresh-dependencies 会获取最后的代码,但是当我转到 grails-app.domain 文件夹时,我没有看到我的新域类。
当前的解决方法
我必须去我的 .grails/2.3.4/projects/myProject/plugins 删除插件,然后运行 grails refresh-dependencies 以获得最新版本的插件。
问题
- 有没有更快/更好的方法来做到这一点,而不必困扰 .grails 目录中的插件?
附上我的 BuildConfig.groovy 的相关部分,以备不时之需:
repositories {
inherits true // Whether to inherit repository definitions from plugins
//This is to be able to download our own custom plugins
String serverRoot = 'http://serverRoot/artifactory'
mavenRepo serverRoot + '/plugins-snapshot-local/'
mavenRepo serverRoot + '/plugins-release-local/'
grailsPlugins()
grailsHome()
mavenLocal()
grailsCentral()
mavenCentral()
mavenRepo 'http://repo.spring.io/milestone'
}
plugins {
// plugins for the build system only
build ":tomcat:7.0.47"
// plugins for the compile step
compile ":scaffolding:2.0.1"
compile ':cache:1.1.1'
// plugins needed at runtime but not for compilation
runtime ":hibernate:3.6.10.6" // or ":hibernate4:4.1.11.6"
runtime ":database-migration:1.3.8"
runtime ":jquery:1.10.2.2"
runtime ":resources:1.2.1"
compile ':spring-security-core:2.0-RC2'
compile ":spring-security-ldap:2.0-RC2"
compile ":spring-security-ui:1.0-RC1"
compile ":mycustomplugin:0.1" //This is the plugin that I want get the latest code for
}
【问题讨论】:
标签: grails-plugin artifactory grails-2.3