[jira] [Commented] (MRESOLVER-151) Switch the default checksum policy from "warn" to "fail"
[ https://issues.apache.org/jira/browse/MRESOLVER-151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17248541#comment-17248541 ] Michael Osipov commented on MRESOLVER-151: -- Yes, that is correct. I haven't thought about this at all. I will modify the issue or spawn a new one accordingly. > Switch the default checksum policy from "warn" to "fail" > > > Key: MRESOLVER-151 > URL: https://issues.apache.org/jira/browse/MRESOLVER-151 > Project: Maven Resolver > Issue Type: Task > Components: Resolver >Affects Versions: 1.6.1 >Reporter: Michael Osipov >Assignee: Michael Osipov >Priority: Major > Fix For: 1.7.0 > > > This mirrors MNG-5728. The change has to happen in > {{DefaultChecksumPolicyProvider}}. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (MRESOLVER-151) Switch the default checksum policy from "warn" to "fail"
[ https://issues.apache.org/jira/browse/MRESOLVER-151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17248338#comment-17248338 ] Robert Scholte commented on MRESOLVER-151: -- My conclusion is, that there will be no need for a default policy anymore. > Switch the default checksum policy from "warn" to "fail" > > > Key: MRESOLVER-151 > URL: https://issues.apache.org/jira/browse/MRESOLVER-151 > Project: Maven Resolver > Issue Type: Task > Components: Resolver >Affects Versions: 1.6.1 >Reporter: Michael Osipov >Assignee: Michael Osipov >Priority: Major > Fix For: 1.7.0 > > > This mirrors MNG-5728. The change has to happen in > {{DefaultChecksumPolicyProvider}}. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (MRESOLVER-151) Switch the default checksum policy from "warn" to "fail"
[ https://issues.apache.org/jira/browse/MRESOLVER-151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17248335#comment-17248335 ] Michael Osipov commented on MRESOLVER-151: -- Correct, that's an implemenation error. > Switch the default checksum policy from "warn" to "fail" > > > Key: MRESOLVER-151 > URL: https://issues.apache.org/jira/browse/MRESOLVER-151 > Project: Maven Resolver > Issue Type: Task > Components: Resolver >Affects Versions: 1.6.1 >Reporter: Michael Osipov >Assignee: Michael Osipov >Priority: Major > Fix For: 1.7.0 > > > This mirrors MNG-5728. The change has to happen in > {{DefaultChecksumPolicyProvider}}. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (MRESOLVER-151) Switch the default checksum policy from "warn" to "fail"
[ https://issues.apache.org/jira/browse/MRESOLVER-151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17248198#comment-17248198 ] Robert Scholte commented on MRESOLVER-151: -- {quote}bq. But Maven does too? Shouldn't we provide sane defaults? Removing default policies would be to change APIs. I think a strict default is better than a dev setting warn due to laziness. {quote} AFAIK Maven always selected the valid policy. For other tools using Artifact Resolver we cannot tell. The contract https://github.com/apache/maven-resolver/blob/master/maven-resolver-spi/src/main/java/org/eclipse/aether/spi/connector/checksum/ChecksumPolicyProvider.java says that policies may never be null. However, the default implementation doesn't work like that: both null and invalid values will silently use the default, whereas both are illegal arguments to me. > Switch the default checksum policy from "warn" to "fail" > > > Key: MRESOLVER-151 > URL: https://issues.apache.org/jira/browse/MRESOLVER-151 > Project: Maven Resolver > Issue Type: Task > Components: Resolver >Affects Versions: 1.6.1 >Reporter: Michael Osipov >Assignee: Michael Osipov >Priority: Major > Fix For: 1.7.0 > > > This mirrors MNG-5728. The change has to happen in > {{DefaultChecksumPolicyProvider}}. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (MRESOLVER-151) Switch the default checksum policy from "warn" to "fail"
[ https://issues.apache.org/jira/browse/MRESOLVER-151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17248162#comment-17248162 ] Michael Osipov commented on MRESOLVER-151: -- bq. I think it is clear to me. So for Maven there's no need to change this, because it provides an explicit policy. For other tools that don't provide an explicit policy (or a non-existing policy) it will now fall back to warn. If we implement this change, if will fail instead. Correct, if not explicitly configured, checksum failures will fail the execution. bq. As said I don't like the idea that Artifact Resolver decides the policy, that should be up to the tool using it. But Maven does too? Shouldn't we provide sane defaults? Removing default policies would be to change APIs. I think a strict default is better than a dev setting warn due to laziness. bq. With that: the IAE is still an option, right? This is a different issue. I agree that a text-based enum should not ignore invalid values by assigning them to default behavior. > Switch the default checksum policy from "warn" to "fail" > > > Key: MRESOLVER-151 > URL: https://issues.apache.org/jira/browse/MRESOLVER-151 > Project: Maven Resolver > Issue Type: Task > Components: Resolver >Affects Versions: 1.6.1 >Reporter: Michael Osipov >Assignee: Michael Osipov >Priority: Major > Fix For: 1.7.0 > > > This mirrors MNG-5728. The change has to happen in > {{DefaultChecksumPolicyProvider}}. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (MRESOLVER-151) Switch the default checksum policy from "warn" to "fail"
[ https://issues.apache.org/jira/browse/MRESOLVER-151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17248147#comment-17248147 ] Robert Scholte commented on MRESOLVER-151: -- I think it is clear to me. So for Maven there's no need to change this, because it provides an explicit policy. For other tools that don't provide an explicit policy (or a non-existing policy) it will now fall back to warn. If we implement this change, if will fail instead. As said I don't like the idea that Artifact Resolver decides the policy, that should be up to the tool using it. Ant tasks can say: my default is warn, unless I'm onfigured to use a different policy, With that: the IAE is still an option, right? > Switch the default checksum policy from "warn" to "fail" > > > Key: MRESOLVER-151 > URL: https://issues.apache.org/jira/browse/MRESOLVER-151 > Project: Maven Resolver > Issue Type: Task > Components: Resolver >Affects Versions: 1.6.1 >Reporter: Michael Osipov >Assignee: Michael Osipov >Priority: Major > Fix For: 1.7.0 > > > This mirrors MNG-5728. The change has to happen in > {{DefaultChecksumPolicyProvider}}. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (MRESOLVER-151) Switch the default checksum policy from "warn" to "fail"
[ https://issues.apache.org/jira/browse/MRESOLVER-151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17248055#comment-17248055 ] Michael Osipov commented on MRESOLVER-151: -- OK, I have just checked both code bases. What Maven basically does is to create a {{RepositoryPolicy}} with {{checksums}} {{fail}}. This value in turn is used in Resolver to query the provider for a proper {{ChecksumProvider}}. So there is no need to provide another provider. The defaults of Resolver only work when the caller never provides a checksum policy. So consider you are using Resolver in your custom code outside Maven land and create a repo with a default policy right now you will get warnings only. You have to configure failures explicitly. With this change your custom code will have failures immediately during transports. Is that clear? I expect sane callers to have fail enabled by explicitly. > Switch the default checksum policy from "warn" to "fail" > > > Key: MRESOLVER-151 > URL: https://issues.apache.org/jira/browse/MRESOLVER-151 > Project: Maven Resolver > Issue Type: Task > Components: Resolver >Affects Versions: 1.6.1 >Reporter: Michael Osipov >Assignee: Michael Osipov >Priority: Major > Fix For: 1.7.0 > > > This mirrors MNG-5728. The change has to happen in > {{DefaultChecksumPolicyProvider}}. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (MRESOLVER-151) Switch the default checksum policy from "warn" to "fail"
[ https://issues.apache.org/jira/browse/MRESOLVER-151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17246873#comment-17246873 ] Michael Osipov commented on MRESOLVER-151: -- I will check that. > Switch the default checksum policy from "warn" to "fail" > > > Key: MRESOLVER-151 > URL: https://issues.apache.org/jira/browse/MRESOLVER-151 > Project: Maven Resolver > Issue Type: Task > Components: Resolver >Affects Versions: 1.6.1 >Reporter: Michael Osipov >Assignee: Michael Osipov >Priority: Major > Fix For: 1.7.0 > > > This mirrors MNG-5728. The change has to happen in > {{DefaultChecksumPolicyProvider}}. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (MRESOLVER-151) Switch the default checksum policy from "warn" to "fail"
[ https://issues.apache.org/jira/browse/MRESOLVER-151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17246827#comment-17246827 ] Robert Scholte commented on MRESOLVER-151: -- All methods of https://github.com/apache/maven-resolver/blob/master/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/DefaultChecksumPolicyProvider.java provide a policy, but every unknown policy if automatically transformed to some default. I still don't like that. If I apply a "super-strict" policy and it doesn't exist, just throw an exception. It is not up to the ChecksumPolicyProvider to just pick one (even with possible different outcome based on the version of artifact-resolver) It that doesn't work with MNG-5728, we need to revisit that issue. > Switch the default checksum policy from "warn" to "fail" > > > Key: MRESOLVER-151 > URL: https://issues.apache.org/jira/browse/MRESOLVER-151 > Project: Maven Resolver > Issue Type: Task > Components: Resolver >Affects Versions: 1.6.1 >Reporter: Michael Osipov >Assignee: Michael Osipov >Priority: Major > Fix For: 1.7.0 > > > This mirrors MNG-5728. The change has to happen in > {{DefaultChecksumPolicyProvider}}. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (MRESOLVER-151) Switch the default checksum policy from "warn" to "fail"
[ https://issues.apache.org/jira/browse/MRESOLVER-151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17246801#comment-17246801 ] Michael Osipov commented on MRESOLVER-151: -- I wouldn't do this because Maven Resolver can live without Maven, but not the other way around. Separation of concerns. We could move this change to Maven Resolver 2.0.0 if explictily required, but I think this is OK for 1.7.0. > Switch the default checksum policy from "warn" to "fail" > > > Key: MRESOLVER-151 > URL: https://issues.apache.org/jira/browse/MRESOLVER-151 > Project: Maven Resolver > Issue Type: Task > Components: Resolver >Affects Versions: 1.6.1 >Reporter: Michael Osipov >Assignee: Michael Osipov >Priority: Major > Fix For: 1.7.0 > > > This mirrors MNG-5728. The change has to happen in > {{DefaultChecksumPolicyProvider}}. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (MRESOLVER-151) Switch the default checksum policy from "warn" to "fail"
[ https://issues.apache.org/jira/browse/MRESOLVER-151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17246796#comment-17246796 ] Robert Scholte commented on MRESOLVER-151: -- But then you want a policy matching a specific Maven version. Maybe a second implementation of ChecksumPolicyProvider (Maven4ChecksumPolicyProvider)? > Switch the default checksum policy from "warn" to "fail" > > > Key: MRESOLVER-151 > URL: https://issues.apache.org/jira/browse/MRESOLVER-151 > Project: Maven Resolver > Issue Type: Task > Components: Resolver >Affects Versions: 1.6.1 >Reporter: Michael Osipov >Assignee: Michael Osipov >Priority: Major > Fix For: 1.7.0 > > > This mirrors MNG-5728. The change has to happen in > {{DefaultChecksumPolicyProvider}}. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (MRESOLVER-151) Switch the default checksum policy from "warn" to "fail"
[ https://issues.apache.org/jira/browse/MRESOLVER-151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17246795#comment-17246795 ] Michael Osipov commented on MRESOLVER-151: -- No, I don't think so because MNG-5728 would not work. I think Maven sets a custom policy so this one does not apply. If used outside of Maven land this is likely used. Ant Tasks. > Switch the default checksum policy from "warn" to "fail" > > > Key: MRESOLVER-151 > URL: https://issues.apache.org/jira/browse/MRESOLVER-151 > Project: Maven Resolver > Issue Type: Task > Components: Resolver >Affects Versions: 1.6.1 >Reporter: Michael Osipov >Assignee: Michael Osipov >Priority: Major > Fix For: 1.7.0 > > > This mirrors MNG-5728. The change has to happen in > {{DefaultChecksumPolicyProvider}}. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (MRESOLVER-151) Switch the default checksum policy from "warn" to "fail"
[ https://issues.apache.org/jira/browse/MRESOLVER-151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17246783#comment-17246783 ] Robert Scholte commented on MRESOLVER-151: -- To me it makes sense that Maven provides a default policy for artifact-resolver, but is artifact-resolver responsible for choosing the default? I would go for IllegalArgumentException. > Switch the default checksum policy from "warn" to "fail" > > > Key: MRESOLVER-151 > URL: https://issues.apache.org/jira/browse/MRESOLVER-151 > Project: Maven Resolver > Issue Type: Task > Components: Resolver >Affects Versions: 1.6.1 >Reporter: Michael Osipov >Assignee: Michael Osipov >Priority: Major > Fix For: 1.7.0 > > > This mirrors MNG-5728. The change has to happen in > {{DefaultChecksumPolicyProvider}}. -- This message was sent by Atlassian Jira (v8.3.4#803005)