gnodet commented on PR #14: URL: https://github.com/apache/maven-toolchains-plugin/pull/14#issuecomment-1966918747
> > > Wouldn't it be great if `settings.xml` could also be made optional by usage of env vars as well? > > > > > > Settings are already interpolated so we can use env vars already, I'm using it locally with the following: > > ``` > > <mirror> > > <id>central</id> > > <mirrorOf>central</mirrorOf> > > <url>${env.MAVEN_CENTRAL}</url> > > </mirror> > > ``` > > > > > > > > > > > > > > > > > > > > > > > > so that I can point to a mirror on my LAN when available. > > Toolchains are also interpolated and env vars seems to be supported too fwiw. > > So it's not really settings being optional, but it's easy to setup a project's settings.xml or toolchains.xml that just use env variables, wouldn't that work ? > > The point is to have a standard method by which Maven can detect specific env vars for this without having to explicitly write a `settings.xml` or `toolchains.xml`, as it is an inconvenience to both generate and maintain these files. Let's put the settings.xml aside for this PR. This PR provides a `ToolchainDiscover` component which can be used to discover toolchains instead of having to write the `toolchains.xml`. It's just missing a [few lines of code](https://github.com/apache/maven-toolchains-plugin/pull/14/files#diff-a3c373bf8f7bf3b7edb54c35d0078d25d90c3f59a9fd4bc8ffa8f8076cfa3e02R288-R330) to add a discovery mechanism based on environment variables. What is the most used syntax to define those ? I can easily add it. @rmannibucau @norrisjeremy -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org