Package org.apache.camel.maven.packaging
Class ComponentDslMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.apache.camel.maven.packaging.AbstractGeneratorMojo
org.apache.camel.maven.packaging.ComponentDslMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="generate-component-dsl",
threadSafe=true,
requiresDependencyResolution=COMPILE_PLUS_RUNTIME,
defaultPhase=PROCESS_CLASSES)
public class ComponentDslMojo
extends AbstractGeneratorMojo
Generate Endpoint DSL source files for Components.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected FileThe base directoryprotected FileThe project build directoryprotected StringThe package where to generate component DSL specific factoriesprotected StringThe package where to the main DSL component package isprotected FileComponent Metadata fileprotected FileThe catalog directory where the component json files areprotected FileComponents DSL Metadataprotected FileThe output directoryFields 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
ConstructorsConstructorDescriptionComponentDslMojo(org.apache.maven.project.MavenProjectHelper projectHelper, org.codehaus.plexus.build.BuildContext buildContext) -
Method Summary
Modifier and TypeMethodDescriptioncapitalize(String str) voidexecute()voidexecute(org.apache.maven.project.MavenProject project) static Optional<org.apache.camel.tooling.model.ComponentModel.ComponentOptionModel> findConfiguration(Collection<org.apache.camel.tooling.model.ComponentModel.ComponentOptionModel> options) getMainDescriptionWithoutPathOptions(org.apache.camel.tooling.model.ComponentModel model) toCamelCaseLower(String str) uncapitalize(String str) Methods inherited from class org.apache.camel.maven.packaging.AbstractGeneratorMojo
addResourceDirectory, cache, canonicalClassName, createProperties, createProperties, 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
-
buildDir
The project build directory -
baseDir
The base directory -
sourcesOutputDir
The output directory -
componentsMetadata
Component Metadata file -
outputResourcesDir
Components DSL Metadata -
componentsDslPackageName
@Parameter(property="camel.pmp.package-name", defaultValue="org.apache.camel.builder.component") protected String componentsDslPackageNameThe package where to the main DSL component package is -
componentsDslFactoriesPackageName
@Parameter(property="camel.pmp.factories-package-name", defaultValue="org.apache.camel.builder.component.dsl") protected String componentsDslFactoriesPackageNameThe package where to generate component DSL specific factories -
jsonDir
@Parameter(property="camel.pmp.json-directory", defaultValue="${project.basedir}/../../catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components") protected File jsonDirThe catalog directory where the component json files are
-
-
Constructor Details
-
ComponentDslMojo
@Inject public ComponentDslMojo(org.apache.maven.project.MavenProjectHelper projectHelper, org.codehaus.plexus.build.BuildContext buildContext)
-
-
Method Details
-
execute
public void execute(org.apache.maven.project.MavenProject project) throws org.apache.maven.plugin.MojoFailureException, org.apache.maven.plugin.MojoExecutionException - Overrides:
executein classAbstractGeneratorMojo- Throws:
org.apache.maven.plugin.MojoFailureExceptionorg.apache.maven.plugin.MojoExecutionException
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException- Throws:
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureException
-
capitalize
-
uncapitalize
-
xmlEncode
-
javadoc
-
getMainDescriptionWithoutPathOptions
public String getMainDescriptionWithoutPathOptions(org.apache.camel.tooling.model.ComponentModel model) -
toCamelCaseLower
-
findConfiguration
public static Optional<org.apache.camel.tooling.model.ComponentModel.ComponentOptionModel> findConfiguration(Collection<org.apache.camel.tooling.model.ComponentModel.ComponentOptionModel> options)
-