Package org.apache.camel.maven.packaging
Class EndpointDslMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.apache.camel.maven.packaging.AbstractGeneratorMojo
org.apache.camel.maven.packaging.EndpointDslMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="generate-endpoint-dsl",
threadSafe=true,
requiresDependencyResolution=COMPILE_PLUS_RUNTIME,
defaultPhase=PROCESS_CLASSES)
public class EndpointDslMojo
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 specific Endpoint factoriesprotected FileComponent Metadata fileprotected StringThe package where to generate component Endpoint factoriesprotected 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
ConstructorsConstructorDescriptionEndpointDslMojo(org.apache.maven.project.MavenProjectHelper projectHelper, org.codehaus.plexus.build.BuildContext buildContext) -
Method Summary
Modifier and TypeMethodDescriptioncreateBaseDescription(org.apache.camel.tooling.model.BaseOptionModel option, String kind, boolean ignoreMultiValue, String optionDoc) voidexecute()voidexecute(org.apache.maven.project.MavenProject project) getMainDescription(org.apache.camel.tooling.model.ComponentModel model) getMainDescription(org.apache.camel.tooling.model.ComponentModel model, boolean withPathParameterDetails) headerNameMethodName(String headerName) optionJavaType(org.apache.camel.tooling.model.ComponentModel.EndpointOptionModel option) pathParameterJavaDoc(org.apache.camel.tooling.model.ComponentModel model) 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 -
endpointFactoriesPackageName
@Parameter(defaultValue="org.apache.camel.builder.endpoint") protected String endpointFactoriesPackageNameThe package where to generate component Endpoint factories -
componentsFactoriesPackageName
@Parameter(defaultValue="org.apache.camel.builder.endpoint.dsl") protected String componentsFactoriesPackageNameThe package where to generate component specific Endpoint factories -
sourcesOutputDir
The output directory -
componentsMetadata
Component Metadata file -
outputResourcesDir
Components DSL Metadata -
jsonDir
@Parameter(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
-
EndpointDslMojo
@Inject public EndpointDslMojo(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
-
headerNameMethodName
-
createBaseDescription
-
optionJavaType
public String optionJavaType(org.apache.camel.tooling.model.ComponentModel.EndpointOptionModel option) -
camelCaseLower
-
getComponentNameFromType
-
getMainDescription
-
getMainDescription
public String getMainDescription(org.apache.camel.tooling.model.ComponentModel model, boolean withPathParameterDetails) -
pathParameterJavaDoc
-
xmlEncode
-
javadoc
-