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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T07:03:01+00:00 2026-06-12T07:03:01+00:00

In my project I have two modules (A,B) depend on common module C .

  • 0

In my project I have two modules (A,B) depend on common module C.
I would like A,B share common configuration, such as repository configuration, plugin configuration, etc. In order to achieve this, C is made the parent pom and A,B inherit from it (no aggregation is required, so C does not reference A,B)

However, C by itself contains some java code, along with unit tests. Now, if I run mvn test inside C nothing is executed. Supposedly, pom-packaged modules should not include any code.

Is the above configuration terribly flawed? Should yet another common pom be introduced even though one already exists?

  • 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-12T07:03:02+00:00Added an answer on June 12, 2026 at 7:03 am

    At very typical pattern in Maven projects is to have a module named “parent” which holds your common Maven-specific configuration, profiles, properties, dependency versions, etc. This is The Maven Way (TM).

    The structure looks something like the following:

    |-- parent
    |-- common
    |-- module-a
    |-- module-b
    

    So, common, module-a and module-b each depend on parent, and module-a and module-b depend on common.

    See this excellent resource:
    http://www.sonatype.com/books/mvnex-book/reference/multimodule-web-spring.html

    Note that “parent” can be a sibling of its child modules, in terms of directory structure. There is no requirement that the directory structure hierarchy match that of the modules.

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

Sidebar

Related Questions

Consider this scenario: I have a project with two modules and one common module
I have a multi-module Maven project A. There are two modules: B and C,
I have a multi module maven project containing a common model project and two
I have a Maven multi-module project and I need two different parent POMs in
I have two projects, appA and appB, that each depend on a third project,
I have a .NET 4.0 project with two modules that will communicate via WCF
I have an IntelliJ IDEA project contains two Scala modules M1 and M2. Each
I have small project consisting of one maven project and two maven modules. One
I have a multi-module maven project made up of three sub-modules: web , service
I have a small (very small) zend project that covers two modules, the admin

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.