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

  • Home
  • SEARCH
  • 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 5943059
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T16:20:28+00:00 2026-05-22T16:20:28+00:00

When building an old project, sometimes I encounter the dreaded Failed to resolve artifact

  • 0

When building an old project, sometimes I encounter the dreaded Failed to resolve artifact error.

What I do then is search for the jar and pom of that specific artifact and use the mvn install:install-file goal to manually install it locally.

This solves the trivial case, but sometimes the project’s dependency on the artifact is not trivial and includes in the project’s pom fields such as:

      <scope>runtime</scope>

or worse:

      <exclusion>
        <groupId>cglib</groupId>
        <artifactId>cglib-nodep</artifactId>
      </exclusion>

How would you handle these cases? Is there a way to add these fields to the command as well?

  • 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-22T16:20:29+00:00Added an answer on May 22, 2026 at 4:20 pm

    A runtime dependency is one that Maven will add to the test classpath, and include in an assembly or war, but will not include in the compile classpath. If you need to run tests or package, you just have to do exactly the same install:install-file thing (or, better yet, run a repo manager and deploy it). Runtime is a scope.

    If, on the other hand, you ran into:

    <dependency>
       <groupId>abelian</groupId>
       <artifactId>grape</groupId>
       <type>transitive</type>
    </dependency>
    

    Then you’d need to use -Dpackaging=transitive for install:install-file, and similarly for ‘classifier’ (-Dclassifier).

    If you need to add something to your dependency tree that had an exclusion in its pom, then you’re going to need to find or construct a POM with that exclusion, and pass it to the install-file goal, which has a -D for the POM. There’s nothing you can tell install:install-file to tell it to add exclusions when constructing a POM from thin air.

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

Sidebar

Related Questions

When building my Xcode project I am receiving a Linker error that I cannot
I have an old C++ project and I'm having problem building it. For a
I'm building a program that relies on a old legacy system. I'm especially writing
After upgrading to Lion and re-building the project I noticed that Apple's texturetool started
I was building an Ant build file that worked properly in my eclipse project
Building the same project (without any changes) produces binary different exe-files: some small regions
building a site using PHP and MySQL that needs to store a lot of
Building a website that has English & Japanese speaking users, with the Japanese users
In building a C++ project with the GNU tool chain, make tells me ~
I'm working on a large website project that makes heavy use of in-page graphing

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.