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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T02:54:22+00:00 2026-06-15T02:54:22+00:00

The dependency bellow pulls another dependency: httpcore.4.1.4 . <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpclient</artifactId> <version>4.2</version> <scope>compile</scope> </dependency>

  • 0

The dependency bellow pulls another dependency: httpcore.4.1.4.

<dependency>
  <groupId>org.apache.httpcomponents</groupId>
  <artifactId>httpclient</artifactId>
  <version>4.2</version>
  <scope>compile</scope>
</dependency>

Doing so will throws ClassDefNotFound, during deployment.

Using httpcore.4.2 though, everything works.

I even added both dependencies directly into my pom:

<dependency>
  <groupId>org.apache.httpcomponents</groupId>
  <artifactId>httpclient</artifactId>
  <version>4.2</version>
  <scope>compile</scope>
</dependency>
        
<dependency>
  <groupId>org.apache.httpcomponents</groupId>
  <artifactId>httpcore</artifactId>
  <version>4.2</version>
  <scope>compile</scope>
</dependency>

This doesn’t change anything and I’m still facing the same issue: maven downgrades httpcore.4.2 to httpcore.4.1.2.

The dependencyManagement looks like this:

<dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>org.apache.httpcomponents</groupId>
      <artifactId>httpcore</artifactId>
      <version>4.2</version>
      <scope>compile</scope>
    </dependency>
  </dependencies>
</dependencyManagement>
  • 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-15T02:54:23+00:00Added an answer on June 15, 2026 at 2:54 am

    You might have a transitive dependency, one your other dependencies depend on the version you don’t want.

    To get an overview of all dependencies, direct and transitive, try:

    mvn dependency:tree

    If you find a crash between different versions of the same dependency, the first thing you should do is figure out whether the crash is critical (do you need both?) If not, upgrade so that the lowest dependency version will become equal to the highest. If it is a transitive dependency consider upgrading the version of this.

    If you just want to lock on to a specific version of the dependency, you have some choices:

    Exclude the transitive dependency:

    <dependency>
      <groupId>com.something</groupId>
      <artifactId>something</artifactId>
      <exclusions>
        <exclusion>
          <groupId>com.somethingElse</groupId>
          <artifactId>somethingElse</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    

    Include a specific version:

    <dependency>
      <groupId>com.somethingElse</groupId>
      <artifactId>somethingElse</artifactId>
      <version>2.0</version>
    </dependency>
    

    Any dependency version added explicitly in your pom will override the version of any transitive dependency of the same groupId/artifactId.

    Although being a bit of a puzzle, you should try to get compatible versions of your dependencies, that being version with the same version transitive dependencies.

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

Sidebar

Related Questions

<dependency> <groupId>org.apache.tika</groupId> <artifactId>tika-parsers</artifactId> <version>0.9</version> </dependency> I was trying to add this below dependency instead
I added the below depdencies in my pom <dependency> <artifactId>richfaces-api</artifactId> <groupId>org.richfaces.framework</groupId> <version>3.3.3.Final</version> </dependency> <dependency>
I am getting an error as below: For dependency Dependency {groupId=weblogic, artifactId=webservices, version=9.2, type=jar}:
I am using a dependency of scope provided pom file of an artifact. Because
I only need to use this class org.apache.commons.io.FileUtils, and yet I'm downloading all commons
I have a xml file with below structure <project> <dependency id=abc version=1.2.3.4/> </project> I
I had been doing dependency injection using raw pointers and I decided to convert
In the below code, MousePressImage is a dependency property of class ButtonControl . The
Dependency Injection frameworks in Ruby have been pretty much declared unnecessary. Jamis Buck wrote
Dependency injection is a useful technique but what approach is recommended when faced with

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.