Questions tagged [multi-module]

A multi-module project/application is composed by several modules each focusing on a certain concern, enforcing the SRP (Single Responsibility Principle) at module level.

A multi-module project/application is composed by several modules each focusing on a certain concern, enforcing the SRP (Single Responsibility Principle) at module level.

In , a multi-module project is handled via aggregation of an aggregator project providing list of aggregated modules.

Often, but not necessarily, the aggregator project is also the parent project of aggregated modules, providing further governance and common management on - for example - plugins, dependencies, properties.

More Info

886 questions
23
votes
3 answers

End to end integration test for multiple spring boot applications under Maven

What is the recommended way of running an end to end integration test for multiple Spring boot applications in the Maven build's verify phase? Basically, I have a multi-module Maven project where several modules are separate spring boot…
23
votes
6 answers

How to resolve dependencies between modules within multi-module project?

After working with Maven for a while, I am thrilled by the many features that Maven brings into the build architecture, particularly the dependency management. However, I have run into one issue again and again - how Maven resolves dependencies…
Lan
  • 6,470
  • 3
  • 26
  • 37
21
votes
4 answers

SpringBoot doesn't recognize RestController from another module in multi module Java application

I've spent quite some time but I can't get past this (configuration) issue. Technology stack : Java (1.8), Springboot (starter-parent, starter-web), Maven, IntelliJ IDEA Description: Trying to create a multi module Java application composed (at…
Sorin J
  • 542
  • 1
  • 4
  • 14
21
votes
4 answers

How to update the version of child modules in Maven?

How to update the version of child modules? There are a lot of Stackoverflow questions like this but I was not able to find one that fit this exact scenario... would love if this is a duplicate. Consider the following project. parent --mod1 …
Jose Martinez
  • 11,452
  • 7
  • 53
  • 68
20
votes
2 answers

Maven multi module project cannot find sibling module

I can't seem to get Maven to find a sibling's module in a multi-module project. I've run mvn clean install in all modules. Here's the setup: Product +-- MagniCompCommon +-- Model The Model project has MagniCompCommon as a dependency. When I run…
Mike Cooper
  • 1,065
  • 3
  • 13
  • 34
18
votes
1 answer

What is the difference between using maven -pl option and running maven from module level?

Is there any difference between C:/dev/path/to/Project> mvn package -pl MyModule -am -s settings.xml and C:/dev/path/to/Project/MyModule> mvn package -am -s ../settings.xml As far as I'm concerned, the result of these two actions should be he…
karokir
  • 373
  • 1
  • 3
  • 9
17
votes
1 answer

Difference between multi-module (pom) and java module system

I'm trying to understand the difference(s) between structuring a project with the Java Platform Module System (JPMS) versus structuring a project using multi-poms. Is the main difference that the JPMS encapsulates the code while a multi-pom project…
16
votes
2 answers

How to config slf4j+logback in a multi-module Maven project?

My Maven project has about seven sub-modules. Six of them packages as JARs and one as WAR. Should I create individual logback.xml config in each module? Or should I have a "common" module that all other modules depend on, and put one single…
scabbage
  • 1,412
  • 2
  • 15
  • 27
14
votes
2 answers

Maven multi-module: aggregate common dependencies in a single one?

I have searched for such a question without finding anything, so here I go. I have a multi-module maven project. Multiple modules all inherit the same parent, where common dependencies are defined. Among them, there is one my own modules, a 'common'…
Eleaar
  • 238
  • 1
  • 3
  • 9
14
votes
1 answer

How can I pull all modules in IntelliJ IDEA ULTIMATE project at once?

I have a multi-module project in IntelliJ. Each of the modules is stored in a separate git repository. I have already set them up, so I marked each of them as VCS root in IntelliJ. Am I able to pull all of them at once using IDE, or should I use…
xenteros
  • 15,586
  • 12
  • 56
  • 91
14
votes
1 answer

Maven issue to build one module using revision property

Recently we tried to deploy files using jenkins providing ${revision} property for the build ( Maven 3.3.9 ). It worked OK on json creating 0.0.1-SNAPSHOT for dev builds and 0.0.1-RC for releases, but we have an issue using maven on developer…
Igor Grinfeld
  • 568
  • 2
  • 9
  • 21
14
votes
3 answers

GitLab CI How to trigger pipeline for submodules in maven multi-module project

I have a multi-module Maven project: root SubmoduleA src pom.xml SubmoduleB src pom.xml pom.xml .gitlab-ci.yml Is there any way I can trigger a CI pipeline only on SubmoduleA when somebody…
Vince
  • 357
  • 1
  • 7
  • 18
14
votes
2 answers

Spring MVC annotation based Configuration for multimodule project

I implemented two maven based independent web project implemented using Spring MVC, hibernate and Jax-RS. But my requirement changed and now I need to combine both the project as a sub project into another project which is our parent project. So I…
dhyanandra singh
  • 1,071
  • 2
  • 18
  • 38
14
votes
1 answer

Maven POM file: any rule on ordering of elements and sections?

Concerning the pom.xml Maven file: Is there any specific rule to apply to the ordering of declared sections? Does it have any importance or impact on the build? Shall I follow any official convention?
A_Di-Matteo
  • 26,902
  • 7
  • 94
  • 128
14
votes
3 answers

Can a multi-module maven archetype be set up to have optional modules ?

I am going to create a multi-module archetype. It will generate several modules. Some users of the archetype may need all of them, while some only need some of them. Can my archetype take arguments from the command line and decide which modules to…
Jian Chen
  • 586
  • 7
  • 20
1
2
3
59 60