Class GenerateModuleMojo

  • All Implemented Interfaces:
    org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

    @Mojo(name="generate-module",
          threadSafe=true,
          defaultPhase=GENERATE_RESOURCES,
          requiresDependencyResolution=RUNTIME)
    public class GenerateModuleMojo
    extends org.apache.maven.plugin.AbstractMojo
    Generates a GWT module definition from Maven dependencies, or merge <inherits/> with a module template.

    When no module template exist, the behavior is identical to using an empty file.

    META-INF/gwt/mainModule files from the project dependencies (not transitive) are used to generate <inherits/> directives. Those directives are inserted at the very beginning of the generated module (notably, they'll appear before any existing <inherits/> directive in the module template).

    If moduleShortName is specified (and not empty), it overwrites any existing rename-to from the module template.

    Unless the module template contains a source folder (either <source/> or <super-source/>, those three lines will be inserted at the very end of the generated module (this is to keep any includes or excludes or specific path from the module template):

    
     <source path="client"/>
     <source path="shared"/>
     <super-source path="super"/>
     
    • Field Summary

      • Fields inherited from interface org.apache.maven.plugin.Mojo

        ROLE
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void execute()  
      • Methods inherited from class org.apache.maven.plugin.AbstractMojo

        getLog, getPluginContext, setLog, setPluginContext
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GenerateModuleMojo

        public GenerateModuleMojo()
    • Method Detail

      • execute

        public void execute()
                     throws org.apache.maven.plugin.MojoExecutionException,
                            org.apache.maven.plugin.MojoFailureException
        Throws:
        org.apache.maven.plugin.MojoExecutionException
        org.apache.maven.plugin.MojoFailureException