Class GenerateCodeMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
com.dslplatform.mojo.GenerateCodeMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

@Mojo(name="generate-code") public class GenerateCodeMojo extends org.apache.maven.plugin.AbstractMojo
  • Field Details

    • GOAL

      public static final String GOAL
      See Also:
    • SERVICES_FILE

      private static final String SERVICES_FILE
      See Also:
    • context

      private final MojoContext context
    • project

      @Component private org.apache.maven.project.MavenProject project
    • compiler

      @Parameter(property="compiler") private String compiler
    • generatedSources

      @Parameter(property="generatedSources", defaultValue="target/generated-sources") private String generatedSources
    • servicesManifest

      @Parameter(property="servicesManifest", defaultValue="target/classes/META-INF/services") private String servicesManifest
    • target

      @Parameter(property="target", required=true) private String target
    • dsl

      @Parameter(property="dsl", defaultValue="dsl") private String dsl
    • namespace

      @Parameter(property="namespace", defaultValue="") private String namespace
    • options

      @Parameter(property="options") private String[] options
    • plugins

      @Parameter(property="plugins", defaultValue=".") private String plugins
  • Constructor Details

    • GenerateCodeMojo

      public GenerateCodeMojo()
  • Method Details

    • getProject

      public org.apache.maven.project.MavenProject getProject()
    • setProject

      public void setProject(org.apache.maven.project.MavenProject project)
    • setCompiler

      public void setCompiler(String value)
    • getCompiler

      public String getCompiler()
    • setGeneratedSources

      public void setGeneratedSources(String value)
    • getGeneratedSources

      public String getGeneratedSources()
    • setServicesManifest

      public void setServicesManifest(String value)
    • getServicesManifest

      public String getServicesManifest()
    • setTarget

      public void setTarget(String value)
    • getTarget

      public String getTarget()
    • setDsl

      public void setDsl(String value)
    • getDsl

      public String getDsl()
    • setNamespace

      public void setNamespace(String value)
    • getNamespace

      public String getNamespace()
    • setOptions

      public void setOptions(String[] value)
    • getOptions

      public String[] getOptions()
    • setPlugins

      public void setPlugins(String value)
    • getPlugins

      public String getPlugins()
    • getContext

      public MojoContext getContext()
    • 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
    • registerServices

      private void registerServices(MojoContext context) throws org.apache.maven.plugin.MojoExecutionException
      Throws:
      org.apache.maven.plugin.MojoExecutionException
    • copyGeneratedSources

      private void copyGeneratedSources(MojoContext context, com.dslplatform.compiler.client.parameters.Targets.Option parsedTarget) throws org.apache.maven.plugin.MojoExecutionException
      Throws:
      org.apache.maven.plugin.MojoExecutionException