Is it possible to execute Groovy scrips packed into JAR file, and next execute jar in Java Plugin in

Is it possible to execute Groovy scrips packed into JAR file, and next execute it in Java Plugin (Jira)?
Thanks for respond, Is there a tutorials or something else? Which class should I use?