Class PrepareComponentMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.apache.camel.maven.packaging.AbstractGeneratorMojo
org.apache.camel.maven.packaging.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 Details

    • baseDir

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

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

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

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

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

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

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

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

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

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

    • PrepareComponentMojo

      @Inject public PrepareComponentMojo(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:
      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...