Search code examples
mavengrailsmaven-plugingrails-plugin

Which grails-maven-plugin version is compatible with Maven 3.0.4?


I have a project running grails 2.3.9 and right now I'm using the following grails-maven-plugin:

<plugin>
    <groupId>org.grails</groupId>
    <artifactId>grails-maven-plugin</artifactId>
    <version>2.4.3</version>
    <configuration>
        <grailsVersion>2.3.9</grailsVersion>
        <!-- Whether for Fork a JVM to run Grails commands -->
        <fork>false</fork>
    </configuration>
    <extensions>true</extensions>
</plugin>

But when I try to run some mvn command I'm getting this error:

[ERROR] Failed to execute goal org.grails:grails-maven-plugin:2.4.3:clean (default-clean) on project my-portal: The plugin org.grails:grails-maven-plugin:2.4.3 requires Maven version 3.1.0 -> [Help 1]

I'm not able to upgrade my Maven version right now, so I need to run grails-maven-plugin compatible with Maven 3.0.4.

Where can I find the compatible version for grails-maven-plugin to run it with Maven 3.0.4?


Solution

  • Version 2.4.3 of the grails-maven-plugin requires Maven 3.1.0. This is defined as a pre-requisite in the pom.xml of that plugin (source code).

    The change was made in this commit between version 2.3.8 and 2.4.0.

    Since you mentioned you can't upgrade Maven, you need to downgrade to version 2.3.8 (at most) of grails-maven-plugin which only requires a Maven version of at least 2.0.5.