问题
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