deploying groovy code in artifact + Groovy SDK vs. embeddable groovy-all-XXX.jar

Hi,

I have a Spring WebApp which I'd like to deploy / package up as an artifact.  My spring app deploys / uses .groovy scripts that are loaded at runtime via Spring's script refresh-check-delay capability and are NOT deployed as .class files.

My question is as follows:

  • When I first created my project / groovy for the first time, the groovy sdk uses all jars under groovy_home/lib
  • For my webapp artifact
    • do I add the entire groovy sdk to my artificat (WEB-INF/lib)?
    • However, I'd prefer to just add groovy-all-XXX.jar(I'm using latest groovy, 1.7.2) to my artifact.  If I do this, can I change my groovy sdk / global libraries to use groovy-all.jar instead of all jars under groovy_home/lib?  Is there a reason why IntelliJ takes all jars under groovy_home/lib?


Would appreciate any input / recommended IntelliJ way to set Groovy SDK jars in IntelliJ + which jars to deploy.

Thanks

1 comment
Comment actions Permalink

Hi,

Yes, you can change all the jars under lib to one groovy-all.jar if you
want. The reason we don't offer this by default is that some of those
jars are not included in groovy-all. Just go to the module settings,
find the Groovy library there, press Edit, remove all the jars and add
the one you want.

If you deploy groovy scripts as source, you probably shouldn't compile
them to .class files. This may be done if you go to Settings | Compiler
and add *.groovy to the resource pattern list.

0

Please sign in to leave a comment.