Package org.apache.camel.maven.packaging
Class PackageDataFormatMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.apache.camel.maven.packaging.AbstractGeneratorMojo
org.apache.camel.maven.packaging.PackageDataFormatMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="generate-dataformats-list",
threadSafe=true,
requiresDependencyResolution=COMPILE_PLUS_RUNTIME)
public class PackageDataFormatMojo
extends AbstractGeneratorMojo
Analyses the Camel plugins in a project and generates extra descriptor information for easier auto-discovery in
Camel.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected FileThe output directory for generated dataformats fileprotected FileThe output directory for generated dataformats fileprotected FileThe output directory for generated dataformats fileprotected ClassLoaderprotected FileThe output directory for generated dataformats fileFields inherited from class org.apache.camel.maven.packaging.AbstractGeneratorMojo
buildContext, GENERATED_MSG, NL, project, projectHelperFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
ConstructorsConstructorDescriptionPackageDataFormatMojo(org.apache.maven.plugin.logging.Log log, org.apache.maven.project.MavenProject project, org.apache.maven.project.MavenProjectHelper projectHelper, File dataFormatOutDir, File configurerSourceOutDir, File configurerResourceOutDir, File schemaOutDir, org.codehaus.plexus.build.BuildContext buildContext) -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute()Execute goal.static StringgeneratePropertyConfigurer(String pn, String cn, String en, Collection<org.apache.camel.tooling.model.DataFormatModel.DataFormatOptionModel> options) intMethods inherited from class org.apache.camel.maven.packaging.AbstractGeneratorMojo
addResourceDirectory, cache, canonicalClassName, createProperties, createProperties, execute, findConfigurations, format, getProjectClassLoader, haveResourcesChanged, isJsonFile, loadClass, newTreeSet, refresh, refresh, updateResource, updateResource, velocityMethods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
dataFormatOutDir
@Parameter(defaultValue="${project.basedir}/src/generated/resources") protected File dataFormatOutDirThe output directory for generated dataformats file -
configurerSourceOutDir
@Parameter(defaultValue="${project.basedir}/src/generated/java") protected File configurerSourceOutDirThe output directory for generated dataformats file -
configurerResourceOutDir
@Parameter(defaultValue="${project.basedir}/src/generated/resources") protected File configurerResourceOutDirThe output directory for generated dataformats file -
schemaOutDir
The output directory for generated dataformats file -
projectClassLoader
-
-
Constructor Details
-
PackageDataFormatMojo
public PackageDataFormatMojo() -
PackageDataFormatMojo
public PackageDataFormatMojo(org.apache.maven.plugin.logging.Log log, org.apache.maven.project.MavenProject project, org.apache.maven.project.MavenProjectHelper projectHelper, File dataFormatOutDir, File configurerSourceOutDir, File configurerResourceOutDir, File schemaOutDir, org.codehaus.plexus.build.BuildContext buildContext)
-
-
Method Details
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureExceptionExecute goal.- Throws:
org.apache.maven.plugin.MojoExecutionException- execution of the main class or one of the threads it generated failed.org.apache.maven.plugin.MojoFailureException- something bad happened...
-
prepareDataFormat
public int prepareDataFormat() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
generatePropertyConfigurer
public String generatePropertyConfigurer(String pn, String cn, String en, Collection<org.apache.camel.tooling.model.DataFormatModel.DataFormatOptionModel> options) throws IOException - Throws:
IOException
-
generateMetaInfConfigurer
-