Hi,

I have a couple of questions regarding the recent changes to how
*aether.conflictResolver.verbose* property is set:
https://github.com/apache/maven-resolver/blob/master/maven-resolver-util/src/main/java/org/eclipse/aether/util/graph/transformer/ConflictResolver.java#L106
.

1. To be able to set the verbosity level to *Verbosity.FULL* the client
code needs to have the maven-resolver 1.9.8 in their classpath, to have an
access to the Verbosity enum. Also, that means that it's not possible to
use system properties to set the verbosity level to *Verbosity.FULL*.
Wouldn't it be better to check if the string property value contains any
Verbosity enum constant? Something along these lines:

    private static Verbosity getVerbosity(RepositorySystemSession session) {
        final Object verbosityValue =
session.getConfigProperties().get(CONFIG_PROP_VERBOSE);
        if (verbosityValue instanceof Boolean) {
            return (Boolean) verbosityValue ? Verbosity.STANDARD :
Verbosity.NONE;
        } else if (verbosityValue instanceof String) {
            String verbosityStringValue = verbosityValue.toString();
            for (Verbosity verbosity : Verbosity.values()) {
                if (verbosity.name().equalsIgnoreCase(verbosityStringValue))
{
                    return verbosity;
                }
            }
            return Boolean.parseBoolean(verbosityStringValue) ?
Verbosity.STANDARD : Verbosity.NONE;
        } else if (verbosityValue != null) {
            throw new IllegalArgumentException("Unsupported Verbosity
configuration: " + verbosityValue);
        }
        return Verbosity.NONE;
    }

2. I'm not sure that I fully understand why the old *true* value is mapped
to the new *Verbosity.STANDARD* value and not *Verbosity.FULL*. Isn't it a
backward incompatible change? When verbosity was set to *true* the old
implementation was not doing any deletions of the nodes, while the new
implementation is doing some cleaning of the graph when verbosity is set to
*Verbosity.STANDARD*.

Thank you!

Best regards,
Alexey Venderov
mailto: avende...@gmail.com

Reply via email to