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.AbstractMojoBase class for API based generation MOJOs.
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringCOMPONENT_PACKAGEprotected StringcomponentNameprotected StringcomponentPackageprotected org.slf4j.Loggerlogprotected static StringOUT_PACKAGEprotected StringoutPackageprotected static StringPREFIXprotected org.apache.maven.project.MavenProjectprojectprotected Stringscheme
-
Constructor Summary
Constructors Constructor Description AbstractGeneratorMojo()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidexecute()protected abstract voidexecuteInternal()Template Method which assumesprojectClassLoaderis set.static StringgetCanonicalName(Class<?> type)protected static org.apache.velocity.app.VelocityEnginegetEngine()protected ClassLoadergetProjectClassLoader()protected voidmergeTemplate(org.apache.velocity.VelocityContext context, File outFile, String templateName)static voidrefresh(org.sonatype.plexus.build.incremental.BuildContext buildContext, Path file)protected voidsetProjectClassLoader(ClassLoader projectClassLoader)static voidupdateResource(org.sonatype.plexus.build.incremental.BuildContext buildContext, Path out, String data)
-
-
-
Field Detail
-
PREFIX
protected static final String PREFIX
- See Also:
- Constant Field Values
-
OUT_PACKAGE
protected static final String OUT_PACKAGE
- See Also:
- Constant Field Values
-
COMPONENT_PACKAGE
protected static final String COMPONENT_PACKAGE
- See Also:
- Constant Field Values
-
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
-
-
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
-
executeInternal
protected abstract void executeInternal() throws ExceptionTemplate Method which assumesprojectClassLoaderis 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
-
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)
-
-