Class AbstractGeneratorMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.apache.camel.maven.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 Details

    • PREFIX

      protected static final String PREFIX
      See Also:
    • OUT_PACKAGE

      protected static final String OUT_PACKAGE
      See Also:
    • COMPONENT_PACKAGE

      protected static final String COMPONENT_PACKAGE
      See Also:
    • 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 Details

    • AbstractGeneratorMojo

      public AbstractGeneratorMojo()
  • Method Details

    • 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
    • executeInternal

      protected abstract void executeInternal() throws Exception
      Template Method which assumes projectClassLoader is set.
      Throws:
      Exception
    • 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.codehaus.plexus.build.BuildContext buildContext, Path out, String data)
    • refresh

      public static void refresh(org.codehaus.plexus.build.BuildContext buildContext, Path file)