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 9146061
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T10:40:05+00:00 2026-06-17T10:40:05+00:00

How do I reference a dependency by convention within my project build path? Allow

  • 0

How do I reference a dependency by convention within my project build path? Allow me to elaborate…

I’m using the Groovy/Grails Tool Suite (GGTS 3.0). I’m referencing the dependency as such in my BuildConfig.groovy:

dependencies {
    compile 'tgt:jaxb-utils:1.0'
}

The referenced jar file is successfully pulled down from the Artifactory repo – I can find the jar file on my local file system in the Ivy cache. When I run any grails targets (grails compile, grails run-app, grails run-tests), it works fine – meaning my code that imports the classes from the jar has no problems. When I run grails war, the referenced jar file is packed into the constructed war.

However, and here is the crux of this post – the project build path does not reference this jar file by default or convention, so my java or groovy code that imports the classes from the jar file reports a unable to resolve class ... error.

One solution is to simply add the jar file to the lib folder and update the build path accordingly, or modify the build path to reference the jar file in the Ivy cache folder. However, I’d have to do this for any/all dependencies pulled down in this way. Any jars in the lib folder will get saved to the team source code repository, and that seems like wasted space since the grails commands work fine with just the dependency reference in BuildConfig.groovy.

Am I just being too idealistic (ie – difficult) here, or is there a better way to clean up the unable to resolve class ... errors in my IDE without having to manually add the dependent jar files to my lib folder and update my build path? Ideas?

  • 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-06-17T10:40:06+00:00Added an answer on June 17, 2026 at 10:40 am

    Eclipse / STS / GGTS : If you have Grails plugin installed, you can do the following :

    Right click on your project -> Grails Tools -> Refresh dependencies (or shortcut “Alt+G, R”)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Setting up a build dependency without using a reference? Is it possible
I am heavily using dependency injection in my application. As such, my components reference
How can I reference another workspace project using Eclipse m2e ? Do I have
How to reference local modules using dependency.yml Thought I would just drop this question
I've been trying to follow this example and using the reference to guide me,
I've read in this post that all the ProxyFactory dependency was removed by using
I'm wondering how I should store/reference my dependency injection container(s). Is it alright to
I had been doing dependency injection using raw pointers and I decided to convert
I'm building a Java application which has a dependency on the Apache Airavata project.
I'm having a couple of problems with circular reference/dependency that I've been sitting on

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.