public abstract class AbstractGeneratorMojo
extends org.apache.maven.plugin.AbstractMojo
| Modifier and Type | Field and Description |
|---|---|
protected static String |
COMPONENT_PACKAGE |
protected String |
componentName |
protected String |
componentPackage |
protected org.slf4j.Logger |
log |
protected static String |
OUT_PACKAGE |
protected String |
outPackage |
protected static String |
PREFIX |
protected org.apache.maven.project.MavenProject |
project |
protected String |
scheme |
| Constructor and Description |
|---|
AbstractGeneratorMojo() |
| Modifier and Type | Method and Description |
|---|---|
void |
execute() |
protected abstract void |
executeInternal()
Template Method which assumes
projectClassLoader is set. |
static String |
getCanonicalName(Class<?> type) |
protected static org.apache.velocity.app.VelocityEngine |
getEngine() |
protected ClassLoader |
getProjectClassLoader() |
protected void |
mergeTemplate(org.apache.velocity.VelocityContext context,
File outFile,
String templateName) |
static void |
refresh(org.sonatype.plexus.build.incremental.BuildContext buildContext,
Path file) |
protected void |
setProjectClassLoader(ClassLoader projectClassLoader) |
static void |
updateResource(org.sonatype.plexus.build.incremental.BuildContext buildContext,
Path out,
String data) |
protected static final String PREFIX
protected static final String OUT_PACKAGE
protected static final String COMPONENT_PACKAGE
protected final org.slf4j.Logger log
@Parameter(defaultValue="org.apache.camel.component.internal") protected String outPackage
@Parameter(required=true,
property="org.apache.camel.scheme")
protected String scheme
@Parameter(required=true,
property="org.apache.camel.componentName")
protected String componentName
@Parameter(required=true,
defaultValue="org.apache.camel.component")
protected String componentPackage
@Parameter(required=true,
defaultValue="${project}",
readonly=true)
protected org.apache.maven.project.MavenProject project
protected static org.apache.velocity.app.VelocityEngine getEngine()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionpublic final void execute()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprotected abstract void executeInternal()
throws Exception
projectClassLoader is set.Exceptionprotected ClassLoader getProjectClassLoader()
protected void setProjectClassLoader(ClassLoader projectClassLoader)
protected void mergeTemplate(org.apache.velocity.VelocityContext context,
File outFile,
String templateName)
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionpublic static void updateResource(org.sonatype.plexus.build.incremental.BuildContext buildContext,
Path out,
String data)
public static void refresh(org.sonatype.plexus.build.incremental.BuildContext buildContext,
Path file)
Apache Camel