Plugin with id 'maven' not found

引入maven插件出问题了,总是报错找不到maven插件。

Caused by: org.gradle.api.plugins.UnknownPluginException: Plugin with id ‘maven’ not found.

原因分析:

这是关于该问题的讨论文章。就是说Gradle 7.版本将maven插件移除了,见官方说明

Removal of the legacy maven plugin

The maven plugin has been removed. You should use the maven-publish plugin instead.

Please refer to the documentation of the Maven Publish plugin for more details.

 

需要使用maven publish插件替代。

 

解决方案:

 

使用maven publish插件即可,用法可以看maven-publish官方文档

 

posted @ 2022-08-25 22:00  培轩  阅读(1690)  评论(0)    收藏  举报