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

Maven: Add -s option to support specifying a custom settings.xml file. #520

Open
mrg opened this issue May 5, 2021 · 3 comments
Open

Maven: Add -s option to support specifying a custom settings.xml file. #520

mrg opened this issue May 5, 2021 · 3 comments

Comments

@mrg
Copy link

mrg commented May 5, 2021

Cannot use the plugin because project requires a custom settings.xml file and could not find a way to specify this file in the project's README.

Please add the ability to specify custom settings (mvn -s ~/custom-settings.xml). Ideally per-project in case different projects require different settings.

@caroso-de
Copy link

+1 from me. As a workaround: Have a look at the output console, it will show you where it expects a settings.xml. You kann link your custom settings there

@mrg
Copy link
Author

mrg commented Sep 16, 2022

I know the location of the standard settings (~/.m2/settings.xml) which is where I have generalized settings. I also have a ~/.m2/current-client-settings.xml which I have set up for when I'm on VPN doing work for my current client (needs to use their private Nexus, etc). I have the rest of my environment set up to support that work on a per-project basis, but this plugin only looks at the generalized settings and not the custom one I need. Hoping for a generalized way to have a dot-file or similar I can put in each repository root that will instruct the plugin of custom settings when needed.

The only alternative I can find is manually moving ~/.m2 settings files around when I'm on/off VPN, which is annoying/cumbersome. I even looked for ways to run custom scripts with the VPN client that I could use to automate moving settings when I connect/disconnect, but that isn't supported, either.

@caroso-de
Copy link

i agree, ist’s not optimal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants