Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Changed package names to new package

...

Code Block
package sample.plugin

import org.codehaus.groovygmaven.maven.mojo.GroovyMojo

/**
 * Says "Hi" to the user... er well not really :-P.
 *
 * @goal sayhi
 */
public class GreetingMojo
    extends GroovyMojo
{
    void execute() {
        log.info('Groovy baby!')
    }
}

...

Code Block
<project>
    <modelVersion>4.0.0</modelVersion>
    <groupId>sample.plugin</groupId>
    <artifactId>maven-hello-plugin</artifactId>
    <packaging>maven-plugin</packaging>
    <version>1.0-SNAPSHOT</version>
    <name>Sample Maven Plugin</name>

    <dependencies>
        <dependency>
            <groupId>org.codehaus.groovy.maven<gmaven</groupId>
            <artifactId>gmaven-mojo</artifactId>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.groovy.maven<gmaven</groupId>
                <artifactId>gmaven-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>generateStubs</goal>
                            <goal>compile</goal>
                            <goal>generateTestStubs</goal>
                            <goal>testCompile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>

...

No Format
mvn archetype:generate -DarchetypeGroupId=org.codehaus.groovygmaven.maven.archetypes -DarchetypeArtifactId=gmaven-archetype-mojo -DarchetypeVersion=1.0-rc-2

...