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
14
votes
5 answers

Maven java compile error can not access CommonClassA

Background: I am developing Maven multi module project. One of the module is common module needed by other all modules. This module contain CommonClassA.java. common module is properly compiled. It is installed into maven local repository…
user2210293
  • 141
  • 1
  • 1
  • 4
14
votes
2 answers

How to set up a multi-module project with equal hierarchy modules in IntelliJ?

I am wondering how to configure the following project layout in IntelliJ: An Android application A server back end feeding data to this application Bean classes that are shared between back end and Android application Initially, I wanted to create…
Rafael Winterhalter
  • 42,759
  • 13
  • 108
  • 192
14
votes
4 answers

Why and when to create a multi-module Maven project?

I have a general question about Maven's multi module project. When and why to go for it?
Hussain Ashruf
  • 401
  • 1
  • 8
  • 20
13
votes
1 answer

Maven copy resources in multi module project

My need is pretty basic but I could not find any clean answer to it: I simply need to be able to distribute a resource in a multi-module project. Let us consider for example the LICENSE file, which I hereby assume to be the same for all modules. I…
Luca Geretti
  • 10,206
  • 7
  • 48
  • 58
13
votes
3 answers

maven: multi-module project assembly into single jar

I have a multi-module project and want to create a single jar containing the classes of all my modules. Inside my parent POM, I declared the following plugin: org.apache.maven.plugins
Jeroen
  • 527
  • 2
  • 7
  • 19
13
votes
3 answers

Eclipse Maven showing multiple paths for the same file

Is there any setting in Eclipse to show only the Maven project where the file resides? I have different Maven projects which are modules of a parent Maven project: projParent |-projWeb |-projModel |-projServices |-... If I look for a…
user593029
  • 511
  • 7
  • 18
13
votes
3 answers

How to restructure Maven multi-module project?

I appologize for the length of this post, but I had trouble making it more concise without presenting the picture. I've recently inherited the job of build-master for a maven 3.0 multi-module project. The problem is that the structure of the…
Eric B.
  • 23,425
  • 50
  • 169
  • 316
12
votes
4 answers

Eclipse + Maven + Git + Multi-Module projects = Unhappiness

We've got a multi-module project using Eclipse and Maven. The only way I could get it to work in the past was to use a flat layout for the projects, where the parent module was a peer to the other modules. This worked fine with m2eclipse and…
ccleve
  • 15,239
  • 27
  • 91
  • 157
12
votes
1 answer

Best practice for Gradle api vs implementation in multi-module project

This is not the commonly asked question about the difference between api and implementation, and hopefully will be more advance and interesting from the point of view of architecting a multi-module project. Let say I have the following modules in an…
Robert Estivill
  • 12,369
  • 8
  • 43
  • 64
12
votes
2 answers

Spring-Boot multi module unable to read properties file from another module

I have searched High and low and still I am unable to find a simple answer to this very annoying problem, I have followed this great guide: JWT with multi service app Everything works great but in the end of the guide we are suggested to create a…
Roie Beck
  • 1,113
  • 3
  • 15
  • 30
12
votes
2 answers

Publish a bom from a multi-module-project

We are a large company with about 2000 separate Java projects. For historic reasons, we do not have multi-module projects, but we would like to introduce them. Logically, we already have "groups" of projects, i.e. someone responsible for (say) 50…
J Fabian Meier
  • 33,516
  • 10
  • 64
  • 142
12
votes
1 answer

Maven - Child Module Profiles

Problem I have a maven project that has a similar structure to the following one: (simplified for explanation purposes) --parent |-- child A (inherits from parent) |-- child B (inherits from parent) |-- child B1 (inherits from B) …
JDC
  • 4,247
  • 5
  • 31
  • 74
11
votes
3 answers

Cross-module code coverage with jacoco and gradle multi-module project

We use gradle 3.3 and jacoco tool verson 0.7.6.201602180812. We have a gradle multi-project like this: parent prod1 prod2 prod3 int-test We use unit-tests testing the project sources and jacoco on all child-projects producing test.exec files.…
Michael Zöller
  • 125
  • 1
  • 1
  • 8
11
votes
1 answer

Spring Security in a multi module Maven project (where to put DB auth, UserDetails, etc.?)

At the moment we have 6 Maven modules: webapp security core (provides database access to User) common module1 module2 The dependency tree is pretty obvious I think: webapp depends on everything security depends on core core depends on…
Benjamin M
  • 23,599
  • 32
  • 121
  • 201
11
votes
4 answers

Maven says I have a cyclic reference in multi-module project but can't figure out why

I have a multi-module project that looks like this: module1 pom.xml module2 pom.xml pom.xml The pom.xml in module2 has a dependency on module1. When I run mvn clean compile I get the following error: The projects in the reactor contain a…
user977208
  • 603
  • 2
  • 5
  • 13
1 2
3
59 60