简体   繁体   中英

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

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?

  • 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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