问题
I have a simple Grails 2.2.4
application that simply lists a bunch of items on a page. So I only have one controller and I'm not even using the database.
Now, I want to convert this application into an OSGi sling bundle so that I can run it under Adobe CQ.
when I prepare the Grails app it creates a WAR file...how can I tweak it such that it creates a war/jar file that is an OSGi bundle?
As an example, I came across this Slingbucks example. I was able to built it (JAR) and upload the JAR to Adobe CQ and I was able to run it inside Adobe CQ.
Question
I'm wondering if there is a way to tweak a Grails app such that can be run as a bundle in Adobe CQ
回答1:
first install the grails osgi plugin or the jira grails plugin (more recent)
grails install-plugin osgi
then you can follow the instructions at the Groovy site to convert it to a jar.
来源:https://stackoverflow.com/questions/24326118/is-it-possible-to-convert-a-simple-grails-application-to-osgi-bundle-that-can-ru