How to read mavens settings.xml
?
#4784
Replies: 1 comment 2 replies
-
hi @svaningelgem ; thanks for exploring further! Know that we also have a public Slack if that's an option for you. Otherwise welcome to help you here. Did you already explore the rewrite-maven-plugin repository? That has code to configure and load the MavenSettings when we parse Maven files: https://github.com/openrewrite/rewrite-maven-plugin/blob/ab0ed4b0a21fbc689b76966bf8a9daa5468ccc45/src/main/java/org/openrewrite/maven/MavenMojoProjectParser.java#L672-L718 Could it be that your maven settings files are perhaps not in the default |
Beta Was this translation helpful? Give feedback.
-
@timtebeek : I previously filed ticket #4589 because we couldn't use openrewrite to download internal parent pom files.
I thought it was due to the encrypted passwords (which wasn't supported yet at the time). However, this didn't resolve my issue.
So, I'm coming back with the question: how is the
settings.xml
read during a normal run when included inside maven?As far as I could spot in the code, it's only read during tests, but not a normal run?
Could you point me to the code where it is, so I can start my investigation from there?
All I could see is that openrewrite gets only 1 repository inside the
MavenPomDownloader::downloadMetadata
method (and that is the defaultrepo.maven.org
, but no mirrors as we have defined).So maybe it's also protected by a system setting (?How to configure it in the pom.xml file?), or maybe the settings file is really not taken into account?
Thanks for giving me the pointers, then I can continue my investigation into why it's still not working for us.
Beta Was this translation helpful? Give feedback.
All reactions