Questions tagged [maven-module]
106 questions
72
votes
7 answers
How do I exclude certain modules from a Maven build using the commandline
Is there a way to exclude some modules from a big reactor build, similar to -pl ?
Here are a number of ways to do it persistently:
How to exclude a module from a Maven reactor build?
I want to do it from shell, or at least without modifying the…

Bastl
- 2,926
- 5
- 27
- 48
52
votes
5 answers
Maven Multi Module benefits over simple dependency
I have some years of experience with maven projects, even with multi modules ones (which has made me hate the multi modules feature of maven (so the disclaimer is now done)) and even if I really like maven there is something I cannot get a clear…

benzonico
- 10,635
- 5
- 42
- 50
21
votes
1 answer
Jenkins building a product consisting of many Maven projects? (with Jenkins Pipeline plugin?)
We have a product that consists of many Maven projects that depend on each other. All of these Maven projects come together in a single project which delivers the end product.
The Maven projects share the same life cycle. In other words, they are…

MarnixKlooster ReinstateMonica
- 9,640
- 14
- 54
- 108
12
votes
2 answers
Differences between a multi-module project and a parent project
In multi-module project in Maven, we have a parent pom with modules defined in tag, and in each module, we define which the parent pom is.
Why this two-way definition?
Why not define the relationship between them just in the parent part…

Gilad Baruchian
- 930
- 3
- 14
- 30
12
votes
1 answer
How does Maven order modules in the reactor
Questions like this haven been asked over and over but somehow they just focus on dependencies. So according to the maven documentation the build order is determined as follows.
a project dependency on another module in the build
a plugin…

pjanssen
- 1,065
- 13
- 35
11
votes
3 answers
How to test Maven module project with Spring Boot
I have split a project, based on Spring Boot, into several Maven modules. Now only the war-project contains a starter class (having a main method, starting Spring), the other modules are of type jar.
How do I test the jar projects, if they don't…

Stefan
- 12,108
- 5
- 47
- 66
10
votes
2 answers
Single-module vs Multi-modules maven project
I'm creating a new java web project. This web application will have many modules such as core/commons, business service, repository, security, integration, ldap, user management,.... I wonder if I should separate each module into each maven project…

Barcelona
- 2,122
- 4
- 21
- 42
9
votes
3 answers
Maven jetty plugin - automatic reload using a multi-module project
I am developing a Java web application, using a multi-module maven project. The project setup is the following:
pom.xml Main maven project, that includes the following modules:
persistence: Entity classes and DAOs
business: Service definition and…

Gaste
- 315
- 7
- 15
7
votes
4 answers
Spring boot test multi module maven application
I have a multi-module maven application which uses Spring boot:
- spring boot parent
- myproject parent (both parent and module pom)
- module1
- module2
- module-it (integration tests)
In my module-it, I add the other…

D3nsk
- 131
- 2
- 13
6
votes
3 answers
Spring boot with maven multi module project
I have a maven multi module project designed like the first answer in following SO post:
Multi-module maven with Spring Boot
Now I want a common maven module that can contain some models to be used by multiple microservices. If I make this common…

Shashank Singhal
- 170
- 1
- 2
- 9
5
votes
1 answer
How to exclude a module and its child modules from a Maven reactor build?
the question was asked many times but I didnt find a solution, how to disable also the child modules of a module!?!
For example:
I want to disable projects BB and CC AND also their child modules
A
|-AA
| |--AAA
|-BB
| |-BBB
|-CC
|-CCC
But when…

pan40
- 317
- 1
- 5
- 15
5
votes
2 answers
How to include a maven module outside of the project context?
I'd like to have a module in some kind of global project directory, so that I can include that module in all other projects that use that common code.
But how can I then tell a maven parent pom to include and compile this global shared module?
The…

membersound
- 81,582
- 193
- 585
- 1,120
5
votes
1 answer
maven multi module project: is relativepath necessary?
I'm trying to link together a set of disjoint maven projects into a standard multi module project.
The interesting thing is that the modules are currently not arranged in a natural heirarchy. If I link together with a parent pom, then the reactor…

phatmanace
- 4,671
- 3
- 24
- 29
5
votes
1 answer
maven release plugin with git don't work in sub folders
We have a problem with the maven-release-plugin with git and maven-modules.
We have the following project structure:
pom.xml(ApplicationTest and ApplicationConf are modules)
ApplicationWeb
---pom.xml(parent pom in root…

sezlem
- 51
- 2
4
votes
1 answer
In a multi-module maven project, can I make a module to calculate transitive dependencies based on the DependencyReducedPom of another module?
This appears to be a simple question but I found it difficult due to maven's extremely rigorous paradigm of lifecycles and phases:
Assuming that in a multi-module maven project, several plugins are used in various phases to rewrite the pom.xml to…

tribbloid
- 4,026
- 14
- 64
- 103