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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T06:55:38+00:00 2026-05-12T06:55:38+00:00

I have a 3rd party dependency in my project, which refer to its dependencies

  • 0

I have a 3rd party dependency in my project, which refer to its dependencies with open-ended version reference:

<version>[4.0,)</version>

How I can override this in my project so my dependency doesn’t use versions of its dependency later than specific version, 6.0 for example? ( versions later than 6.0 require some other packages I do not want at all )

  • 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-12T06:55:39+00:00Added an answer on May 12, 2026 at 6:55 am

    If you specify the transitive dependency explicitly in your project, the version you specify will take precedence.

    For example. In your POM add the dependency on com.foo:bar with a version range with an exclusive upper limit like this:

    <dependencies>
      <dependency>
        <groupId>com.foo</groupId>
        <artifactId>bar</artifactId>
        <version>[4.0,6.0)</version>
      </dependency>
    </dependencies>
    

    Update(2): I just tested this and it does work (I just had a typo in my test project). Here’s my test explanation.

    I have 3 test projects: test-base, test-dependency, and test-transitive.
    The test-base project has a direct dependency on test-dependency, test-dependency has an open-ended dependency on test-transitive.
    I have 3 versions of test-transitive installed, 0.0.1, 1.0.1, and 2.0.1
    If I do dependency:tree on test-base I see this:

    name.seller.rich:test-base:jar:0.0.1
    \- name.seller.rich:test-dependency:jar:0.0.1:compile
       \- name.seller.rich:test-transitive:jar:2.0.1:compile
    

    If I add an explicit dependency on test-transitive in test-base with the dependency range set to [0.0.1,2.0.0), I get this tree instead:

    name.seller.rich:test-base:jar:0.0.1
    +- name.seller.rich:test-dependency:jar:0.0.1:compile
    \- name.seller.rich:test-transitive:jar:1.0.1:compile
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a project which depends on several 3rd party libraries, the project itself
I have an application that depends on a 3rd party open source project hosted
I have 3rd party libraries for my mac applications which used to link nicely
I have a project that loads 3rd party modules (in the form of DLLs)
I have an application, which uses some 3rd party libraries, for example Tesseract library.
Background I'm developing a bookmarklet which has dependencies on 3rd party libraries to be
We have a 3rd party web application which works on in IE6, but not
I have a 3rd party XLL addin I'd like to wrap in my own
I have a 3rd Party tool that generates an xml spreadsheet (*.xls). I have
I have a 3rd party JAR that I have converted to an OSGI bundle

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.