I think I have a solution to that problem, you need a recent maven version, I'm using maven 3.5.2 but the feature was introduced in maven 3.3.1 I believe, not sure.
The idea is to use the local .mvn
folder (in the parent project's folder) where it is possible to configure several things like JVM options, maven options that are always used, etc.
For maven options just create a file maven.config
inside the .mvn
folder with the content --settings ./.mvn/local-settings.xml
, and that should be about it. Of course the local-settings.xml
should be a valid maven settings file.
Here's the structure within the maven project root folder :
parent-mvn-project
├── .mvn
│ ├── local-settings.xml
│ └── maven.config
├── submodule-A (if any submodules)
└── submodule-B (if any submodules)