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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T18:47:00+00:00 2026-05-24T18:47:00+00:00

This is my first question on StackOverflow. Learnt quite a bit reading other Q&A

  • 0

This is my first question on StackOverflow. Learnt quite a bit reading other Q&A so far.

Question is about Maven Multimodule.

Following is my project strurcture:

commons-parent
|--pom.xml
|--commons-module1
   |--pom.xml
   |--core
      |--pom.xml
   |--cli
      |--pom.xml

cli stands for command line interface.

commons-module1 is a library to be used by different projects within company.
commons-module1/core contains the pom which packages only the library classes.
commons-module1/cli contains the pom which packages the command line test programs.

commons-parent/pom.xml (relevant snippet):

<groupId>com.abc.def</groupId>
<artifactId>commons-parent</artifactId>
<packaging>pom</packaging>
<version>1.0-SNAPSHOT</version>

<profile>
    <id>reactor</id>
    <properties>
        <env.type>dev</env.type>
    </properties>
    <modules>
        <module>../commons-module1</module>
    </modules>
</profile>

there is a distribution management section 
but there is no repositories section in pom.

commons-module1/pom.xml (relevant snippet):

<parent>
    <groupId>com.abc.def</groupId>
    <artifactId>commons-parent</artifactId>
    <version>1.0-SNAPSHOT</version>
</parent>   

<groupId>com.abc.def</groupId>
<artifactId>commons-module1</artifactId>
<packaging>pom</packaging>
<version>1.0-SNAPSHOT</version>

<modules>
    <module>cli</module>
    <module>core</module>
</modules>


there is a distribution management section 
but there is no repositories section in pom.

commons-module1/core/pom.xml (relevant snippet):

<parent>
    <groupId>com.abc.def</groupId>
    <artifactId>commons-module1</artifactId>
    <version>1.0-SNAPSHOT</version>
</parent>   

<groupId>com.abc.def</groupId>
<artifactId>commons-module1-core</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>


there is a distribution management section 
but there is no repositories section in pom.

commons-module1/cli/pom.xml (relevant snippet):

<parent>
    <groupId>com.abc.def</groupId>
    <artifactId>commons-module1</artifactId>
    <version>1.0-SNAPSHOT</version>
</parent>   

<groupId>com.abc.def</groupId>
<artifactId>commons-module1-cli</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>


there is a distribution management section 
but there is no repositories section in pom.

Environment:

 Apache Maven 2.1.0 (r755702; 2009-03-18 19:10:27+0000)
 Java version: 1.6.0_25

Problem Description:

When a project needs to depend on commons-module1-core, project will have a maven
dependency in pom as follows:

<dependency>
    <groupId>com.abc.def</groupId>
    <artifactId>commons-module1-core</artifactId>
    <version>1.0-SNAPSHOT</version>
</dependency>

This only works (i.e. dependencies satisfied) when the complete hierarchy
commons-parent,commons-module1,commons-module1-core all three are in local repository.
It doesn’t work if I have any of them missing in local. We have nexus repository manager
set up. So, my expectation was that, the project making use of commons-module1-core library
can just declare above dependency snippet in their pom and through transitive dependency
resolution, get the parent poms.

Am I missing something here?

EDIT

For a simpler use case which I think is similar to my problem – see this unanswered question:

Child not finding parent pom in flat structured multi module maven build

  • 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-05-24T18:47:02+00:00Added an answer on May 24, 2026 at 6:47 pm

    First of all, update to Maven 3.0.3 as soon as possible…2.1.0 has many bugs and will not be mantained any more.
    Second you are misusing some parts of the pom you always wrote:

    <parent>
        <groupId>com.abc.def</groupId>
        <artifactId>commons-module1</artifactId>
        <version>1.0-SNAPSHOT</version>
    </parent>   
    
    <groupId>com.abc.def</groupId>
    <artifactId>commons-module1-core</artifactId>
    <packaging>jar</packaging>
    <version>1.0-SNAPSHOT</version>
    

    But you should do it the following:

    <parent>
        <groupId>com.abc.def</groupId>
        <artifactId>commons-module1</artifactId>
        <version>1.0-SNAPSHOT</version>
    </parent>   
    
    <artifactId>commons-module1-core</artifactId>
    <packaging>jar</packaging>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is my first question here on StackOverflow, and quite frankly I'm fairly new
I think this could be my first question here in stackoverflow. It's about as
this is my first question to stackoverflow so here it goes... I use cruise
This is my first question on stackoverflow. I just wonder why my getJSON code
This is my first StackOverflow question so be nice! :-) I recently came across
Greetings to all! This is my first question here on stackoverflow. I have a
First of all, sorry if this isn't an appropriate question for StackOverflow. I've tried
this is my first question on StackOverflow, but I think that we'll both come
This is my first question at stackoverflow :-). However, I've started to Android programming
my first question on Stackoverflow. Let me start with a bit of code. It's

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.