Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7668641
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T15:24:47+00:00 2026-05-31T15:24:47+00:00

what I have: an external GroovyScript using the apache-commons-io library and a working grails

  • 0

what I have:
an external GroovyScript using the apache-commons-io library

and a working grails application

In the existing grails-application there are different external scripts (as of now only perl-scripts) which are executed async with grails (using the execute-Method).

Now I got an GroovyScript which I want to run the same way as I run the PerlScripts.

At the moment the script has the commons-io-library in a lib-folder. It works fine.

So my question is: How do I provide the groovy-script with the commons-io-library from grails in a smooth and neat way? Do I have to provide the path within the command which is executed via the execute-Method

e.g.:

groovy -cp=path/to/grailshome/lib.jar scripfile.groovy

this won’t really work if I deploy the grailsapplication to the tomcat in the current production-environment as the libs from grails are in a different path.

Putting the script into the src/groovy folder of grails would probably work, but that’s not the way I want it. The script needs to be standalone.

I’m really stuck as I’m not really versed with the technical details of and groovy grails.

Even suggestions and ideas how this can be accomplished are enough.

I hope you understand the question, thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T15:24:48+00:00Added an answer on May 31, 2026 at 3:24 pm

    Is this a situation where using Grapes and putting:

    @Grab( 'commons-io:commons-io:2.1' )
    

    At the top of your groovy script would help?

    If you are running this as a war, then this might work:

    String path = grailsApplication.parentContext
                                   .getResource( 'WEB-INF/lib/commons-io-1.4.jar' )
                                   .file
                                   .absolutePath
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have external felica NFC device adapter now i want to connect that device
I have an external library with some code in it. I also have a
I have external data input that I use in my python scripts (in fact
I have an external library that's calling form.submit() . No matter what I do,
I have an external application uploading a file to my rails web app. (Developed
I have an external C# program which executes a Python script using the Process
I have an external application that calls my application and is supposed to end
I have external html5 canvas that you can paint on some lines using your
I would like to have external proofreaders to work directly inside my Drupal site.
We have an external service that is currently accessible via the http (port 80,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.