Skip to content

settings.xml not being loaded from thin.root #99

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

Closed
bondj opened this issue Feb 5, 2019 · 3 comments
Closed

settings.xml not being loaded from thin.root #99

bondj opened this issue Feb 5, 2019 · 3 comments
Milestone

Comments

@bondj
Copy link

bondj commented Feb 5, 2019

In the readme it says

This will download all the dependencies to ${thin.root}/repository, and look for Maven settings in ${thin.root}/settings.xml.

This does not appear to be working, as our local site-repository is only used when the settings.xml file is in ~/.m2.

I found that if I override user.root to point to the same directory as thin.root it works. (However, there are other libraries that rely on user.root property, so that's not a viable solution).

Looking at the code MavenSettingsReader.java is responsible for loading settings.xml but that is only constructed from non-test code passing in zero parameters, so user.home is always used outside test.

Is this an error in the documentation (ie it should never work), or an error in the implementation? Is there an easier way to specify our site-local repositories?

@dsyer
Copy link
Collaborator

dsyer commented Feb 18, 2019

Is it a problem to put settings.xml in ~/.m2? It's actually quite likely that you'd want to re-locate the repository and not the settings.xml so we need to be careful about changing the default behaviour. Maybe add a new property for the location of settings.xml?

For the sake of clarity, it looks to me like the MavenSettingsReader always looks in ${user.home}/.m2/settings.xml.

@dsyer dsyer closed this as completed in 8d2d90c Feb 18, 2019
@dsyer dsyer added this to the 1.0.22 milestone Feb 18, 2019
@dsyer
Copy link
Collaborator

dsyer commented Feb 18, 2019

Re-opening because of bizarre test failures. Not sure how to fix it yet because it doesn't seem related.

@dsyer dsyer reopened this Feb 18, 2019
@dsyer dsyer closed this as completed in ffe55c5 Feb 19, 2019
@dsyer
Copy link
Collaborator

dsyer commented Feb 19, 2019

Fixed the test. The default now is to use settings.xml from ${thin.root}/.m2 if it exists, and if not to fall back on ${user.home}/.m2.

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