Class 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 Detail

      • buildDir

        @Parameter(defaultValue="${project.build.directory}")
        protected File buildDir
        The project build directory
      • baseDir

        @Parameter(defaultValue="${project.basedir}")
        protected File baseDir
        The base directory
      • sourcesOutputDir

        @Parameter
        protected File sourcesOutputDir
        The output directory
      • componentsMetadata

        @Parameter
        protected File componentsMetadata
        Component Metadata file
      • outputResourcesDir

        @Parameter
        protected File outputResourcesDir
        Components DSL Metadata
      • componentsDslPackageName

        @Parameter(defaultValue="org.apache.camel.builder.component")
        protected String componentsDslPackageName
        The package where to the main DSL component package is
      • componentsDslFactoriesPackageName

        @Parameter(defaultValue="org.apache.camel.builder.component.dsl")
        protected String componentsDslFactoriesPackageName
        The package where to generate component DSL specific factories
    • Constructor Detail

      • ComponentDslMojo

        public ComponentDslMojo()
    • Method Detail

      • execute

        public void execute​(org.apache.maven.project.MavenProject project,
                            org.apache.maven.project.MavenProjectHelper projectHelper,
                            org.sonatype.plexus.build.incremental.BuildContext buildContext)
                     throws org.apache.maven.plugin.MojoFailureException,
                            org.apache.maven.plugin.MojoExecutionException
        Overrides:
        execute in class AbstractGeneratorMojo
        Throws:
        org.apache.maven.plugin.MojoFailureException
        org.apache.maven.plugin.MojoExecutionException
      • 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
      • loadJson

        protected static String loadJson​(File file)
      • findComponentNames

        protected void findComponentNames​(File dir,
                                          Set<String> componentNames)
      • writeSourceIfChanged

        protected boolean writeSourceIfChanged​(String source,
                                               String filePath,
                                               String fileName,
                                               File outputDir)
                                        throws org.apache.maven.plugin.MojoFailureException
        Throws:
        org.apache.maven.plugin.MojoFailureException