Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local settings.xml results current folder used as repository #588

Closed
honnix opened this issue Jan 20, 2022 · 6 comments
Closed

Local settings.xml results current folder used as repository #588

honnix opened this issue Jan 20, 2022 · 6 comments

Comments

@honnix
Copy link

honnix commented Jan 20, 2022

For a reason, we have a valid settings.xml file under our project root folder. This file is not intended to be used by Maven when building and it is only meant to be packed into a container.

It seems mvnd will by default use that file, treat the folder where this file sits as maven repository root, and download artifacts to the folder. Is this an intended behaviour? Plain maven does not seem to be bothered by the existence of this file.

@honnix
Copy link
Author

honnix commented Jan 20, 2022

Tried using mvnd -s .../.m2/settings.xml, mvn -gs .../.m2/settings.xml and mvn -Dmaven.settings=.../.m2/settings.xml. But none of them works and the one in current folder is still being picked up.

Also tried making the settings.xml in the project root folder malformed, and that broke the build, which means it is indeed picked up.

@gnodet
Copy link
Contributor

gnodet commented Jan 20, 2022

I think this is caused by #553

@honnix
Copy link
Author

honnix commented Jan 20, 2022

@gnodet Thanks for the info. Do you mean it's caused by changes made in #573?

@gnodet
Copy link
Contributor

gnodet commented Jan 20, 2022

@gnodet Thanks for the info. Do you mean it's caused by changes made in #573?

No, I meant it's the same issue. This should already be fixed in the master branch if you can build it and give it a try to confirm, that would be awesome !

@honnix
Copy link
Author

honnix commented Jan 20, 2022

Aha, I see. I will give it a try later.

@honnix
Copy link
Author

honnix commented Jan 20, 2022

@gnodet I can confirm that the build from main branch fixes this issue. Thanks for the help! I'm closing this.

@honnix honnix closed this as completed Jan 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants