Closed mathieucarbou closed 1 year ago
I don't understand the motivation here.
.m2
, or using a single command line property set.settings.xml
is supposed to interact like that - but the project should build by default without one.If there is a desire to test "without" settings.xml modifications, it is easy enough to create a blank one (I have one in ~/.m2/settings-blank.xml
):
<settings>
</settings>
and then I can troubleshoot with mvn -s ~/.m2/settings-blank.xml XXXX
Point 1: is not preventing overrides from a global settings.xml file.
Point 1: is also not preventing mistakes (wrong repo url) or missing repos in the pom in case it is there in the global settings.xml file : I have fixed for example 2 issues like that in angela-ee and tcdb thanks to this.
Point 2: NO. Because the difference here is that it is project-provided. You missed the point of the PR, which is to provide a minimally settings.xml file for dev ensuring the project works. Which means no other repo or mirrors are needed besides those declared in the pom or settings file The goal is not to test with an empty one, the goal is to provided a minimal one. I.e. for people requiring some unblocks, then some mirrors could be setup here (I think it's the case for 4.x). In 10.x right now we are using the wrapper which allows to control that better.
Point 4: I disagree also: this is a way to optionally isolate each repo, also settings, per project. Many build systems also for the same, and its also a supported maven convention to have settings.xml at the project root, even eventually added by default with a maven.config
file in .mvn
folder. This si exactly equivalent of the gradle fiels we have which are defining repos and settings per project. There is no global gradle file common to all gradle project.
If there is a desire to test "without" settings.xml modifications, it is easy enough to create a blank one (I have one in
~/.m2/settings-blank.xml
):<settings> </settings>
and then I can troubleshoot with
mvn -s ~/.m2/settings-blank.xml XXXX
The point is not to test with a blank settings...
I'd like that we have such things per project (
./mvn -s settings.xml ...
), that could be optionally used to:In this specific case for platform, the settings is blank because the project runs fine with declared repos in the parent pom.