Class AbstractGeneratorMojo

  • All Implemented Interfaces:
    org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
    Direct Known Subclasses:
    AbstractSourceGeneratorMojo

    public abstract class AbstractGeneratorMojo
    extends org.apache.maven.plugin.AbstractMojo
    Base class for API based generation MOJOs.
    • Field Detail

      • log

        protected final org.slf4j.Logger log
      • outPackage

        @Parameter(defaultValue="org.apache.camel.component.internal")
        protected String outPackage
      • scheme

        @Parameter(required=true,
                   property="org.apache.camel.scheme")
        protected String scheme
      • componentName

        @Parameter(required=true,
                   property="org.apache.camel.componentName")
        protected String componentName
      • componentPackage

        @Parameter(required=true,
                   defaultValue="org.apache.camel.component")
        protected String componentPackage
      • project

        @Parameter(required=true,
                   defaultValue="${project}",
                   readonly=true)
        protected org.apache.maven.project.MavenProject project
    • Constructor Detail

      • AbstractGeneratorMojo

        public AbstractGeneratorMojo()
    • Method Detail

      • getEngine

        protected static org.apache.velocity.app.VelocityEngine getEngine()
                                                                   throws org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.plugin.MojoExecutionException
      • execute

        public final void execute()
                           throws org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.plugin.MojoExecutionException
      • getProjectClassLoader

        protected ClassLoader getProjectClassLoader()
      • setProjectClassLoader

        protected void setProjectClassLoader​(ClassLoader projectClassLoader)
      • mergeTemplate

        protected void mergeTemplate​(org.apache.velocity.VelocityContext context,
                                     File outFile,
                                     String templateName)
                              throws org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.plugin.MojoExecutionException
      • getCanonicalName

        public static String getCanonicalName​(Class<?> type)
      • updateResource

        public static void updateResource​(org.sonatype.plexus.build.incremental.BuildContext buildContext,
                                          Path out,
                                          String data)
      • refresh

        public static void refresh​(org.sonatype.plexus.build.incremental.BuildContext buildContext,
                                   Path file)