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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T14:37:39+00:00 2026-06-15T14:37:39+00:00

I have three separate projects I am working on (A, B, and C). Project

  • 0

I have three separate projects I am working on (A, B, and C).

Project B and C rely on a jar that project A generates.

Does Maven have the ability to automatically build project A if the dependency is not found?

The answers I’ve found so far are indicative of making the other 2 projects modules (which I believe to mean repository layout and incorporate them into project A) and create a parent / child pom.

A just plain “no” was also one of my conclusions as well.

It seems as though if I make a module of project A in B and C, maven doesn’t really like that. Can Maven see projects during build time that are outside of the scope of the current project? Sorry if that’s a little wordy.

  • 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-15T14:37:40+00:00Added an answer on June 15, 2026 at 2:37 pm

    The scenario works fine if A, B and C are modules of a common container project.

    From root pom.xml:

    <modules>
     <module>project-a</module>
     <module>project-b</module>
     <module>project-c</module>
    </modules>
    

    where “project-a” etc. are names of maven project folders inside the parent folder.

    The parent project must have <packaging>pom</packaging> for this to work.

    Then you can build the parent project and it will build all children in order, or you can use one of the advanced Maven reactor flags.

    e.g. mvn clean install -pl project-b will only build project B.

    For more info, execute mvn --help and read the multi modules chapter from the Maven By Example book.


    But to this question:

    Does Maven have the ability to automatically build project A if the
    dependency is not found?

    … the answer is always no. Maven fails if the dependency is not found, but it never decides which projects to build. You are in charge of which projects need building.

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

Sidebar

Related Questions

Say I have three separate color schemes that are used on various pages in
I have a .aspx page that loads three separate .ascx controls to represent adding,
I have the simplest code that I want to separate in three files: Header
I have begun working on a project that, at the moment, produces a monolithic
I am working on a project right now that has to separate project files.
I'm working on a website at the moment that has three separate area's to
I am working on 3 maven projects. They're all separate projects, but they share
I have three separate table variables in my Function, 1 of them is not
I have three separate applications A, B and C. All of them use service
I have a rule, that gets up to three parts, separated by a /

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.