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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T22:59:18+00:00 2026-05-16T22:59:18+00:00

Hi I am trying to create a multi-modules project in eclipse with m2eclipse. I

  • 0

Hi
I am trying to create a multi-modules project in eclipse with m2eclipse. I followed some tutorials but the way it work is not what i expect:

Here is the structure of my project

  -Root
  -    webapps
  -          module1
  -          module2

I have pom.xml for Root and modules. (module 1 and 2 are independent to each other)
In the pom.xml (Root), i have

 <modules>
        <module>./webapps/module1</module>
        <module>./webapps/module2</module>
 </modules>

In module1’s pom.xml:

<parent>
        <groupId>{RootGroupId}</groupId>
        <artifactId>{RootArtifactId}</artifactId>
        <version>{RootVersionId}</version>
        <relativePath>../../pom.xml</relativePath>
    </parent>

In module2, it is similar to module 1.

When I go to Root and run the pom file, it will trigger the Root’s phases first and the module’s phases later (build the root project and also build the module projects). To me it is fine.

But the problem happens when i go to module1 and run the pom.xml. Then it also so do the same: trigger the Root pom.xml and module1’s pom.xml. i dont like this. What i want to be happened is ONLY the module1's pom file is triggered (ONLY module1 is built), root’s pom will not be triggered (Root project is not be built).

Any help, please.

  • 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-16T22:59:18+00:00Added an answer on May 16, 2026 at 10:59 pm

    Update: If you don’t want a plugin configuration to be applied in POMs which inherit from the POM where it is declared, set inherited to false.

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>properties-maven-plugin</artifactId>
        <version>1.0-alpha-1</version>
        <inherited>false</inherited> <!-- THIS SHOULD DO IT -->
        <executions>
          <execution>
            <id>read-project-properties</id>
            <phase>initialize</phase>
            <goals>
              <goal>read-project-properties</goal>
            </goals>
            <configuration>
              <files>
                <file>build.properties</file>
              </files>
            </configuration>
          </execution>
        </executions>
      </plugin>
    

    Reference

    • Maven POM Reference
      • Plugins

    I tried to reproduce the problem… but didn’t succeed. I created a similar project structure:

    $ tree .
    .
    ├── pom.xml
    └── webapps
        ├── module1
        │   ├── pom.xml
        │   └── src
        │       └── main
        │           └── webapp
        │               ├── index.jsp
        │               └── WEB-INF
        │                   └── web.xml
        └── module2
            ├── pom.xml
            └── src
                └── main
                    ├── resources
                    └── webapp
                        ├── index.jsp
                        └── WEB-INF
                            └── web.xml
    

    Where the parent pom.xml declares:

      <modules>
        <module>webapps/module1</module>
        <module>webapps/module2</module>
      </modules>
    

    And each child:

      <parent>
        <artifactId>Q3790987</artifactId>
        <groupId>com.stackoverflow</groupId>
        <version>1.0-SNAPSHOT</version>
        <relativePath>../../pom.xml</relativePath>
      </parent>
    

    Building from the root triggers a reactor build:

    $ mvn install
    [INFO] Scanning for projects...
    [INFO] ------------------------------------------------------------------------
    [INFO] Reactor Build Order:
    [INFO] 
    [INFO] Q3790987
    [INFO] module1 Maven Webapp
    [INFO] module2 Maven Webapp
    [INFO] 
    [INFO] ------------------------------------------------------------------------
    ...
    

    But building a child doesn’t trigger anything on the parent:

    $ cd webapps/module1/
    $ mvn install
    [INFO] Scanning for projects...
    [INFO]                                                                         
    [INFO] ------------------------------------------------------------------------
    [INFO] Building module1 Maven Webapp 1.0-SNAPSHOT
    [INFO] ------------------------------------------------------------------------
    ...

    Everything works as expected for me.


    (initial answer removed as it appeared I misinterpreted the question)

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

Sidebar

Related Questions

Trying to create a multi module maven project in eclipse. Parent Pom.xml <project xmlns=http://maven.apache.org/POM/4.0.0
I am trying to create a multi project template. I wish the sub projects
I'm trying to create a large, multi-page, PHP web application for work where a
I'm trying to create multi volume tar file in bzip2 compression. I'm compressing some
I have a multi-module maven project, and I'm trying to create an assembly for
I am trying to create a multi-dimensional array whose parts are determined by a
I am trying to create a multi level navigation menu with css. I guess
Trying to create a black line in my view to separate text blocks but
Trying to create a new Dedicated Cache Role in Windows Azure but get the
I'm trying to create a multi-level editor in MVC3. By multi-level I mean that

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.