Package org.apache.camel.maven
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 Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected Stringprotected Stringprotected final org.slf4j.Loggerprotected static final Stringprotected Stringprotected static final Stringprotected org.apache.maven.project.MavenProjectprotected StringFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidexecute()protected abstract voidTemplate Method which assumesprojectClassLoaderis set.static StringgetCanonicalName(Class<?> type) protected static org.apache.velocity.app.VelocityEngineprotected ClassLoaderprotected voidmergeTemplate(org.apache.velocity.VelocityContext context, File outFile, String templateName) static voidprotected voidsetProjectClassLoader(ClassLoader projectClassLoader) static voidupdateResource(org.codehaus.plexus.build.BuildContext buildContext, Path out, String data) Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
PREFIX
- See Also:
-
OUT_PACKAGE
- See Also:
-
COMPONENT_PACKAGE
- See Also:
-
log
protected final org.slf4j.Logger log -
outPackage
-
scheme
-
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
Template Method which assumesprojectClassLoaderis set.- Throws:
Exception
-
getProjectClassLoader
-
setProjectClassLoader
-
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
-
updateResource
-
refresh
-