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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T20:59:25+00:00 2026-06-15T20:59:25+00:00

After being introduced to Maven in my most recent project, I’ve been experimenting with

  • 0

After being introduced to Maven in my most recent project, I’ve been experimenting with it for the past couple of weeks.

I currently have a multi-module project in my development environment. Project “A” and Project “B” are child modules of Project “root”, with B having a dependency on A.

I am aware that I can build B independently by using mvn reactor:make... as outlined here. However, I’m curious as to why am I not allowed to build B from inside B’s root folder.

To illustrate this, I first built A independently by running a clean install from within A’s root directory. However, when I tried doing the same action from B’s root directory, Maven reported an error as below –

Could not find artifact org.divesh.mavenrnd:root:pom:1.0 in central

It looks like Maven is not able to resolve the parent’s POM file. Any thoughts on why this is happening? From my initial understanding of Maven multi-module projects, the main reason to split a project into sub modules is to share dependencies. This should not, however, prevent me from building a particular module independently from within its folder.

Thanks.

EDIT

Ran an mvn -N clean install to install only the root project’s POM in the rep. After this, I was able to successfully build B after building and installing A. There is still one thing I’m not quite clear about –
Assuming I’ve installed the root project’s POM in the repository, if I try to build A, does it refer to the parent root POM directly above it or the POM that is installed in the repository?

  • 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-15T20:59:26+00:00Added an answer on June 15, 2026 at 8:59 pm

    You should use mvn -pl ProjectToBuild lifecycle like from the root of your tree:

    mvn -pl module-b package 
    

    You shouldn’t use mvn reactor:make anymore. Except you are using maven 2.0

    If you wan’t to be sure that everything is depending on module-b is build as well you should use:

    mvn -amd -pl module -b package
    

    The best is having a folder layout which represents the appropriate structure of your project and not using relativePath is necessary.

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

Sidebar

Related Questions

After being stumped by an earlier quesiton: SO google-analytics-domain-data-without-filtering I've been experimenting with a
Recently a couple of WCF services have been introduced to our company's API. There
I've recently been loving unit testing after being introduced to the idea in Programming
I have implemented the following set up (after being requested): slideshow of images changing,
I have a situation where a Java Applet hangs after being opened multiple times.
What I am after is being able to have my application, in dev mode,
I have been introduced to xpath today and it seems to be very powerful
After being troubled by an issue that I simply did not have the knowledge
I have document grandchild.xml whose result after being processed with granchild.xsl must be forwarded
After being recommended to use adehabitat to calculate volume of intersection I have stumbled

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.