Class PrepareComponentMojo

  • All Implemented Interfaces:
    org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

    @Mojo(name="prepare-components",
          threadSafe=true)
    public class PrepareComponentMojo
    extends AbstractGeneratorMojo
    Prepares a Camel component analyzing if the maven module contains Camel
    • components
    • dataformats
    • languages
    • others
    And for each of those generates extra descriptors and schema files for easier auto-discovery in Camel and tooling.
    • Field Detail

      • configurerSourceOutDir

        @Parameter(defaultValue="${project.basedir}/src/generated/java")
        protected File configurerSourceOutDir
        The output directory for generated components file
      • configurerResourceOutDir

        @Parameter(defaultValue="${project.basedir}/src/generated/resources")
        protected File configurerResourceOutDir
        The output directory for generated components file
      • componentOutDir

        @Parameter(defaultValue="${project.basedir}/src/generated/resources")
        protected File componentOutDir
        The output directory for generated components file
      • dataFormatOutDir

        @Parameter(defaultValue="${project.basedir}/src/generated/resources")
        protected File dataFormatOutDir
        The output directory for generated dataformats file
      • languageOutDir

        @Parameter(defaultValue="${project.basedir}/src/generated/resources")
        protected File languageOutDir
        The output directory for generated languages file
      • otherOutDir

        @Parameter(defaultValue="${project.basedir}/src/generated/resources")
        protected File otherOutDir
        The output directory for generated others file
      • schemaOutDir

        @Parameter(defaultValue="${project.basedir}/src/generated/resources")
        protected File schemaOutDir
        The output directory for generated schema file
      • buildDir

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

        @Parameter(defaultValue="${camel-prepare-component}")
        protected boolean prepareComponent
    • Constructor Detail

      • PrepareComponentMojo

        public PrepareComponentMojo()
    • 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
        Execute 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...