Plugin with id ‘maven’ not found
2023-07-28 15:20:13
michael007js
746
原因分析 | 解决方案 | |
---|---|---|
apply plugin: ''uploadArchives { repositories.mavenDeployer { repository(url:uri('../repo')) pom.groupId = 'com.hougr' pom.artifactId = 'transform.printjar' pom.version = '1.0.0' } }报错:Caused by: org.gradle.api.plugins.UnknownPluginException: Plugin with id 'maven' not found. | Gradle 7版本将maven插件移除了,用maven publish插件替代。 | apply plugin: 'maven-publish'publishing { publications { publish2Local(MavenPublication) { groupId = 'com.hougr' artifactId = 'transform.printjar' version = '1.0.0'from components.java } }repositories { maven { url = "$buildDir/repo" } } } |