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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T03:22:46+00:00 2026-06-17T03:22:46+00:00

I have one huge project A and which has dependency project B (which is

  • 0

I have one huge project A and which has dependency project B (which is not in our control).
The problem is when I include B under A project pom.xml, everything is fine and the build is successful.

But in few of the areas, where we are facing runtime exceptions due to duplicated classes.

Project A has it’s own JDom dependency version and Project B is using different/Same JDom version. During application run time, it’s thowring InvocationTarget exception due to conflicting classes.

How do I ensure, project A uses it’s own jdom while project B uses it’s own or atleast resolving such conflicts?

  • 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-17T03:22:47+00:00Added an answer on June 17, 2026 at 3:22 am

    You can exclude the (transitive) dependency from your project B which is being imported.

    <project>
      ...
      <dependencies>
        <dependency>
          <groupId>com.example</groupId>
          <artifactId>ProjectB</artifactId>
          <version>1.0</version>
          <scope>compile</scope>
          <exclusions>
            <exclusion>
              <groupId>jdom</groupId>
              <artifactId>jdom</artifactId>
            </exclusion>
          </exclusions> 
        </dependency>
      </dependencies>
    </project>
    

    The above example will cause your Project B dependency to be pulled in, sans its version of the JDOM library.

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

Sidebar

Related Questions

I have one XML request which I need to modify (to XML) and then
I am working on a C++ project which has a huge code base and
I have a source file in my project, which has more than 65,536 code
my company has recently upgraded from VS2005 to VS2010. We have a huge project
I am implementing a really lightweight Web Project, which has just one page, showing
I have a huge multi-module project , which is being built using maven. Most
I have a project which uses Spring, Hibernate, and has controllers which return JSONs.
I am working on my first large python project. I have one function which
An iPad project I have been working on has become bloated with a huge
I have a project (built with Maven) which has many internal dependencies; some of

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.