I'm attempting to create a maven plugin using groovy. I'd like to use groovy version 1.8 or higher.
I've followed these instructions and got things working if I use:
<groupId>org.codehaus.groovy.maven</groupId>
<artifactId>gmaven-plugin</artifactId>
<version>1.0-rc-4</version>
This build my plugin and I'm able to use it in other projects.
However, this gives an older version of groovy (1.5.7). To switch to a newer version, I tried using a new version and providerSelection:
<plugin>
<groupId>org.codehaus.gmaven</groupId>
<artifactId>gmaven-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<goals>
<goal>generateStubs</goal>
<goal>compile</goal>
<goal>generateTestStubs</goal>
<goal>testCompile</goal>
</goals>
<configuration>
<providerSelection>1.8</providerSelection>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.codehaus.gmaven.runtime</groupId>
<artifactId>gmaven-runtime-1.8</artifactId>
<version>1.5</version>
<exclusions>
<exclusion>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>1.8.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
</plugin>
But when I build my plugin, I get the warning:
[WARNING] Deprecation Alert:
[WARNING] No mojo descriptors were found in this project which has a packaging type of maven-plugin.
[WARNING] In future versions of the plugin tools, this will fail the build.
[WARNING] If this project is an archetype, change the packaging type from maven-plugin to maven-archetype.
And when I attempt to use my plugin, maven does not call my plugin at all; I'm guessing this is because of the missing plugin descriptors.
Has anyone been able to successfully build a maven plugin using groovy, with a version of 1.8 or higher?
PS: I also looked into the groovy-eclipse-compiler plugin instead of gmaven, but I seem to always get the warning above.