1

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

saw303
  • 8,051
  • 7
  • 50
  • 90
birdy
  • 9,286
  • 24
  • 107
  • 171

1 Answers1

2

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.

Rachel Gallen
  • 27,943
  • 21
  • 72
  • 81
  • Thanks. I came across the grails osgi plugin but it seems to not have been updated since 2010. I also read some comments that it doesn't work well with grails 2. Just wondering if you've tried it before or have experience with it? – birdy Jun 20 '14 at 11:50
  • no i know it hasn't been updated but it still comes recommended. I haven't used it myself. – Rachel Gallen Jun 20 '14 at 11:51
  • there is an alternative https://jira.grails.org/browse/GRAILS-2221 updated 2014 – Rachel Gallen Jun 20 '14 at 11:54