Howdy,

I already thought about this, and probably shared some thoughts (that may
have slipped, or did not share on ML?).

In short: personally, I consider these "resolver configurations" LOW LEVEL
settings that ARE exposed to those users who are adventurous, but in
general, Maven should provide sane(er) HIGH LEVEL config support for them.

My usual example:
resolver locking: https://github.com/apache/maven/pull/762
resolver transport: https://github.com/apache/maven/pull/711
and so on, and so on....

In short, while you CAN use zillion of -D's to set locking or achieve
anything you want, maven may/should offer out of the box "high level"
(easier to comprehend, "usual" setup, yada yada) config, that is much
easier for users to apply.

===

TL;DR: resolver configuration is "low level" for adventurous developers,
and is exposed for them. OTOH Maven should offer "most common" (or
anticipated) higher level and easier to use config options for some (IMHO
not all) resolver config.


HTH
T

On Thu, Oct 27, 2022 at 7:35 PM Slawomir Jaranowski <[email protected]>
wrote:

> Hi,
>
> Artifact Resolver has many useful configuration options [1]
>
> Most of these properties must be provided by user or system properties.
> Some are extracted from settings.xml
>
> Providing such many settings by command line for every execution is very
> uncomfortable.
>
> We can put those in MAVEN_OPTS by shell profile or by .mavenrc
> But in this case all values are put in the command line by mvn script,
> command line length can be limited ...
> and we have next place to mange Maven configuration
>
> What do you think about allow configure Resolver by settings.xml
> - it looks the most natural way, because settings.xml contains location of
> local repository which is affected by Resolver
> - it will be easier manage whole configuration in one place
>
> Some of the Resolver configurations can have complex type like for:
>  aether.connector.http.headers is Map<String,String>
> Can we provide such configuration by user/system properties?
>
> Propositions:
>
> 1. Pass profiles/profile/properties to Resolver configuration
> - all as is
> - only beginning with aether.*
> - what with complex type?
>
> 2.  Introduce new elements in settings.xml
>
> - profiles/profile/resolverConfig - with global properties
> - profiles/profile/repositories/repository/resolverConfig - for properties
> supports repo id
>
> 3. Use existing servers/server/configuration for properties supports repo
> id
>
>
> Any other ideas, hints?
>
>
> [1] https://maven.apache.org/resolver/configuration.html
>
> --
> Sławomir Jaranowski
>

Reply via email to