#I think we have a plan with @guillaume
1 messages · Page 1 of 1 (latest)
So I was thinking we should have this in 2 ways:
- settings.xml next to dagger.json in the module (or another location, but inside the module)
- pass it via cli: e.g.
dagger call --maven-settings-file=./ci/settings.xml build
If both are provided, cli argument would win. This way it's pretty flexible I think
Alternative to cli argument could be env var I guess but not sure how easy that would be to hook up
Self contained is fine as long as it can be defined in the dagger.json (or maybe .env?). Don't want to have java devs require a flag every time they run the pipeline.
well, I'm not sure to have is in the dagger.json is a good thing, this would be too tight to a module and in breaks in some way the ability to share this module. How to use it somewhere else?
.env could be an option
the settings.xml is really like how we handle secrets
My main idea is to have it at the engine level in some way, to express the idea "everything java on this machine should use this settings.xml"
Exactly like a settings.xml defined in the global maven config.
And that way everything else is really standard, the modules never know by themselves the config
Just thinking out loud, but maybe there's a slightly different approach, at least as a POC to be able to unblock, test modules and solutions before it's part of the core. And something that would work if a single settings.xml can be provided (so without any external dependencies on secrets, env vars, etc).
The (temporary) solution could be to create a fork of the java sdk that hardcodes it. That's really temporary solution, but it might unblock, at least to test.
I think I can prepare that in the next days, a very quick and dirty solution to explore our options.
--maven-settings-file cli flag could be a solution for "everything java should use this settings.xml", not sure how easy that is to implement though, still exploring the codebase😇
Also just thinking out loud, maybe my comments spark something for somebody to get this implemented, not assuming my ideas are actually feasible since im just getting started with dagger
I don't think we will have a --maven-settings-file, it's to put a strong dependency between the CLI and a specific SDK. And in fact there's way more than that.
Let's say you have a go module that has a java module as a dependency. You want this java module to use your settings, but you're running a go module, so a maven settings flag would be really weird
no worries at all, feel free to expose all the ideas you might have