Package org.apache.camel.maven.packaging
Class GenerateEndpointUriFactoryMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.apache.camel.maven.packaging.AbstractGeneratorMojo
-
- org.apache.camel.maven.packaging.GenerateEndpointUriFactoryMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
@Mojo(name="generate-endpoint-uri-factory", threadSafe=true, defaultPhase=PROCESS_CLASSES, requiresDependencyCollection=COMPILE, requiresDependencyResolution=COMPILE) public class GenerateEndpointUriFactoryMojo extends AbstractGeneratorMojo
Abstract class for endpoint uri factory generator.
-
-
Field Summary
Fields Modifier and Type Field Description protected File
buildDir
The project build directoryprotected File
resourcesOutputDir
protected File
sourcesOutputDir
-
Fields inherited from class org.apache.camel.maven.packaging.AbstractGeneratorMojo
buildContext, GENERATED_MSG, NL, project, projectHelper
-
-
Constructor Summary
Constructors Constructor Description GenerateEndpointUriFactoryMojo()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
createEndpointUriFactory(org.apache.camel.tooling.model.ComponentModel model)
void
execute()
protected void
findComponentNames(File dir, Set<String> componentNames)
protected static String
loadComponentJson(Map<File,Supplier<String>> jsonFiles, String componentName)
protected static String
loadJson(File file)
protected static String
loadJsonOfType(Map<File,Supplier<String>> jsonFiles, String modelName, String type)
-
Methods inherited from class org.apache.camel.maven.packaging.AbstractGeneratorMojo
addResourceDirectory, cache, createProperties, createProperties, execute, getProjectClassLoader, haveResourcesChanged, loadClass, refresh, refresh, updateResource, updateResource
-
-
-
-
Field Detail
-
buildDir
@Parameter(defaultValue="${project.build.directory}") protected File buildDir
The project build directory
-
sourcesOutputDir
@Parameter(defaultValue="${project.basedir}/src/generated/java") protected File sourcesOutputDir
-
resourcesOutputDir
@Parameter(defaultValue="${project.basedir}/src/generated/resources") protected File resourcesOutputDir
-
-
Method Detail
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
- Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
-
createEndpointUriFactory
protected void createEndpointUriFactory(org.apache.camel.tooling.model.ComponentModel model) throws IOException
- Throws:
IOException
-
loadComponentJson
protected static String loadComponentJson(Map<File,Supplier<String>> jsonFiles, String componentName)
-
loadJsonOfType
protected static String loadJsonOfType(Map<File,Supplier<String>> jsonFiles, String modelName, String type)
-
-