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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T18:44:26+00:00 2026-06-17T18:44:26+00:00

Here is a my file system setup: .m2/ <— Local Directory app/ pom.xml module1/

  • 0

Here is a my file system setup:

.m2/                 <--- Local Directory
app/
    pom.xml
    module1/
    module2/
    module3/
    target/          <--- Package directory

Question A

In the parent pom.xml, it has a dependency that all the modules depend upon. Though, when it goes into compile phase, module2 will need to depend on something that just compiled in module1 and module3 needs to depend on something in module2. How would you go about doing this without making two or three “maven projects”? Is it possible to run the compile, install, and package phases on each module individually one at a time (I’d rather do this solution)?

Question B

Also, I know when you install the module, all the “stuff” is updated and added to the local repo. When you are in the compile phase, by default, it grabs all the stuff it needs to depend on from the local repo (Correct if I’m wrong). Also, if I were able to achieve Question A, instead of using the local repo to obtain all the information needed for my dependencies, it possible use those same files from the packaged target directory instead?

Can these questions be answered by a simple pom manipulation and/or adding a plug-in? If this is possible, how would I go about doing this?

  • 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-17T18:44:27+00:00Added an answer on June 17, 2026 at 6:44 pm

    Maven is built with the idea of one project-one artifact. What you would normally do in the situation you describe is create a separate POM in each of the modules with the top level POM specified as the parent. Each of the sub modules would then inherit the dependencies of te parent and be free to add additional module specific dependencies. In the top level Pom, you then use the declaration to declare the three sub modules.

    One key advantage is that if there are dependencies between the sub modules (like you describe), then maven will automatically figure out the correct order to build them in based in those dependencies.

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

Sidebar

Related Questions

Here is how I'm creating a file: System.IO.File.Create(Server.MapPath(..) + name + .html); But sometimes
All Here i want to run .sh file via system call in android NDK.
Here I wrote a C program which executes hi.sh file using system call. Here
here is my code:(get file line num and word count) import System.IO import Data.Maybe
how to retrieve both instances of element in an xml file here is how
I am trying to figure out how to properly setup my crossdomain file. Here
Here's the setup: Django (1.2) app on mod_wsgi that imports ctypes Python 2.6.5 Apache
I have setup this File Template in ReSharper 7.0.1 using System; using System.Collections.Generic; using
I am following this tutorial to setup spring in my system, http://www.roseindia.net/spring/spring-mvc-hello-world.shtml . Here
Here's the setup: 1 web server running a C# app to which my users

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.