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 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:

2

The maven plugin was removed in Gradle 7. The documentation suggests to use maven-publish plugin instead.

3

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Maya Lin-Takahashi

Maya Lin-Takahashi

Consumer Tech & Gadget Reviewer

Maya is a hardware enthusiast who tests and reviews smart home devices, smartphones, wearables, and audio gear. She focuses on practical consumer value and build quality.

Share this article
Twitter Facebook Pinterest