Plugin with Id 'Maven' Not Found
Plugin with Id 'Maven' Not Found. I Got This Error in Idea That Uses with 7.1, That Is Strange as Maven Is Built-in Plugin, and Should Be Distributed with...
Plugin with id 'maven' not found.
I got this error in IDEA that uses with 7.1, that is strange as maven is built-in plugin, and should be distributed with gradle.
subprojects {
apply plugin: 'java'
apply plugin: 'java-library'
apply plugin: 'maven'
When running Gradle 6.3, it seems there is no such error.
3 Answers
In Gradle 7.x,
The maven plugin has been removed. You should use the maven-publish plugin instead.
Reference:
The maven plugin was removed in Gradle 7. The documentation suggests to use maven-publish plugin instead.
As the docs says that the maven plugin was removed and to use the maven-publish plugin instead
Another approach was to use the gradle wrapper with version less than 7. Since wrapper is customizable. Creating a wrapper could be found here
So for example
gradle clean build
is equivalent to
./gradlew clean build
Since the version of wrapper is less than 7 every task can be ran with the help of ./gradlew <task> or ./gradlew.bat <task>
This worked for me.