How can I compile a Grails App including a Grails Plugin-Project on my Webserver?

被刻印的时光 ゝ 提交于 2019-12-25 05:24:35

问题


I have a Grails Project with name AProject and a Grails Plugin with name MyPlugin.

I integrate my MyPlugin into AProject, by adding to BuildConfig.groovy as:

plugins {
   ...
  compile ":elasticsearch:0.50" 
}

grails.plugin.location.'elasticsearch' = "../elasticsearch"

On my local computer I then do in the MyPlugin folder

grails maven-install

and in the AProject folder:

grails clean
grails refresh-dependencies
grails run-app

This is working fine on my local computer, but not on my server.

How can I integrate a Grails plugin project on my server?


回答1:


  • grails maven-install //in plugin project if you have .m2 <local maven repo>
  • compile ':my-plugin:0.1' //in Grails app BuildConfig plugin section
  • grails war //in grails app
  • Deploy the war wherever you want.

If this is what you want then you would need nothing else.

Grails will package all compiled files into the war file. The Grails app would pull the plugin artifact from the maven repo (in this case your local maven repo) while building the war file.

If you are building the war on the same machine that you did maven install for the plugin your grails app will find it and you should be good.



来源:https://stackoverflow.com/questions/18218370/how-can-i-compile-a-grails-app-including-a-grails-plugin-project-on-my-webserver

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