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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T00:45:00+00:00 2026-06-15T00:45:00+00:00

I am creating a project ‘test-jar’ in my local and i am using pom

  • 0

I am creating a project ‘test-jar’ in my local and i am using pom file which I don’t have write access as Parent of ‘test-jar’ project. The parent project has already defined depedencyManagement with old versions.

As I have to update dependency versions in my project and planning to override parent’s dependency Management. So, I have created another POM file with my own dependency Management and imported into ‘test-jar’ project.

My Project :

<project>
  <artifactid>test-jar</artifactid>
   <parent>
         <artifactId> test-parent </artifactId>

   </parent>
   <dependencies>
        <dependency>
        <artifactId>jar/artifactId>
       </dependency>
   <dependencies>
   <dependencyManagement>
    <dependencies>
        <dependency>
        <artifactId>custom-pom</artifactId>
            <type>pom</type>
        <scope>import</scope>
    </dependency>
   </dependencyManagement>

</project>

My Parent Project:

<project>
  <artifactid>test-parent</artifactid>

   <dependencyManagement>
    <dependencies>
        <dependency>
        <artifactId>jar/artifactId>
            <version>1.0</version>
    </dependency>
   </dependencyManagement>

</project>

My Custom POM for updated dependencyManagement:

<project>
  <artifactid>custom-pom</artifactid>

   <dependencyManagement>
    <dependencies>
        <dependency>
        <artifactId>jar</artifactId>
            <version>3.0</version>
    </dependency>
   </dependencyManagement>
</project>

The problem is, I am always getting dependency version from parent pom, though i have imported new dependency management in project.

I am using Maven 2.2.1 version here.

Is there any solution how to overwrite Dependency Management from Parent POM ?

  • 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-15T00:45:01+00:00Added an answer on June 15, 2026 at 12:45 am

    Based on the documentation:

    This scope is only used on a dependency of type pom in the
    section. It indicates that the specified POM
    should be replaced with the dependencies in that POM’s
    section. Since they are replaced, dependencies
    with a scope of import do not actually participate in limiting the
    transitivity of a dependency.

    Apart from your problem you can simply use differerent version which are different of the onses defined in the parent pom’s dependencyManagement. Furthermore you could create a separate pom wich defines the dependencies with new version (dependencyManagement) and inherits from the given parent.

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

Sidebar

Related Questions

I have a big project that uses maven and I'm creating the project's jar.
When I am creating one project file by code using the BuidEngine, Does anybody
I am creating a project in which I have three UITextField s and one
I am creating a project with struts and I have a problem using Jasper
I'm creating a project using Polymaps JS lybrary. I have to plot about 200,000
I'm creating a project from the book Sanderson Pro ASp.net mvc3. But I have
I have been busy in my project creating a webapp (in struts) that manages
I am creating a project in struts2 I have created a Registration.jsp page like
I'm creating a project that consists on calling 'bake project' (using DispatchShell ) from
I'm creating a project in which a server receives operations from clients to apply

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.