Class GenerateMojo

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

    @Mojo(name="generate",
          threadSafe=true,
          requiresDependencyResolution=COMPILE_PLUS_RUNTIME,
          defaultPhase=GENERATE_SOURCES)
    public class GenerateMojo
    extends org.codehaus.mojo.exec.AbstractExecMojo
    Parses the source code and generates source code for the csimple language.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static String GENERATED_MSG  
      protected File outputDir
      The output directory for generated source files
      protected File outputResourceDir
      The output directory for generated resources files
      protected org.apache.maven.project.MavenProject project
      The maven project.
      static String RESOURCE_FILE  
      protected File resourceDir
      The resources directory for configuration files
      • Fields inherited from class org.codehaus.mojo.exec.AbstractExecMojo

        classpathScope, executableDependency
      • Fields inherited from interface org.apache.maven.plugin.Mojo

        ROLE
    • Constructor Summary

      Constructors 
      Constructor Description
      GenerateMojo()  
    • Field Detail

      • project

        @Parameter(property="project",
                   required=true,
                   readonly=true)
        protected org.apache.maven.project.MavenProject project
        The maven project.
      • outputDir

        @Parameter(defaultValue="${project.basedir}/src/generated/java")
        protected File outputDir
        The output directory for generated source files
      • outputResourceDir

        @Parameter(defaultValue="${project.basedir}/src/generated/resources")
        protected File outputResourceDir
        The output directory for generated resources files
      • resourceDir

        @Parameter(defaultValue="${project.basedir}/src/main/resources")
        protected File resourceDir
        The resources directory for configuration files
    • Constructor Detail

      • GenerateMojo

        public GenerateMojo()
    • 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
      • doExecuteRoutes

        protected void doExecuteRoutes​(org.apache.camel.language.csimple.CSimpleCodeGenerator generator)
      • updateResource

        public static boolean updateResource​(Path out,
                                             String data)