You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Vincent Massol (Jira)" <ji...@apache.org> on 2023/02/23 15:53:00 UTC
[jira] [Commented] (MRESOLVER-151) Enforce a checksum policy to be provided explicitly
[ https://issues.apache.org/jira/browse/MRESOLVER-151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17692755#comment-17692755 ]
Vincent Massol commented on MRESOLVER-151:
------------------------------------------
Hi guys. Thanks for working on Maven.
Some feedback for you from a Maven API user: XWiki. It took us a a good part of the day to find out why XWiki is now failing with (including having to debug the maven resolver source code):
{noformat}
Unsupported policy:
class org.xwiki.extension.repository.LocalExtensionRepositoryException: Failed to save extension [com.apptasticsoftware:rssreader/3.4.0] descriptor
at org.xwiki.extension.repository.internal.local.DefaultLocalExtensionRepository.storeExtension(DefaultLocalExtensionRepository.java:195)
at org.xwiki.extension.job.internal.InstallJob.storeExtension(InstallJob.java:172)
at org.xwiki.extension.job.internal.InstallJob.store(InstallJob.java:157)
at org.xwiki.extension.job.internal.InstallJob.runInternal(InstallJob.java:126)
at org.xwiki.job.AbstractJob.runInContext(AbstractJob.java:246)
at org.xwiki.job.AbstractJob.run(AbstractJob.java:223)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: class java.lang.IllegalArgumentException: Unsupported policy:
at org.eclipse.aether.internal.impl.DefaultChecksumPolicyProvider.validatePolicy(DefaultChecksumPolicyProvider.java:122)
at org.eclipse.aether.internal.impl.DefaultChecksumPolicyProvider.newChecksumPolicy(DefaultChecksumPolicyProvider.java:59)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector.newChecksumPolicy(BasicRepositoryConnector.java:354)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(BasicRepositoryConnector.java:270)
at org.xwiki.extension.repository.aether.internal.AetherExtensionRepository.getFile(AetherExtensionRepository.java:309)
at org.xwiki.extension.repository.aether.internal.AetherExtensionRepository.openStream(AetherExtensionRepository.java:281)
at org.xwiki.extension.repository.aether.internal.AetherExtensionFile.openStream(AetherExtensionFile.java:54)
at org.xwiki.extension.repository.internal.local.DefaultLocalExtensionRepository.storeExtension(DefaultLocalExtensionRepository.java:183)
at org.xwiki.extension.job.internal.InstallJob.storeExtension(InstallJob.java:172)
at org.xwiki.extension.job.internal.InstallJob.store(InstallJob.java:157)
at org.xwiki.extension.job.internal.InstallJob.runInternal(InstallJob.java:126)
at org.xwiki.job.AbstractJob.runInContext(AbstractJob.java:246)
at org.xwiki.job.AbstractJob.run(AbstractJob.java:223)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
{noformat}
This happened to us when moving the version of Maven we use as a library. It's really not great from a backward compatibility POV that Maven Resolver would change a behavior like this IMO. The reporting of the error could provide more information too.
For reference: https://github.com/xwiki/xwiki-commons/commit/067d23ddb55c2b9335eca8e6b675a54da5f43dc1
Thanks
> Enforce a checksum policy to be provided explicitly
> ---------------------------------------------------
>
> 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.20.10#820010)