Class PrepareKameletMainMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.apache.camel.maven.packaging.PrepareKameletMainMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

@Mojo(name="prepare-kamelet-main", threadSafe=true) public class PrepareKameletMainMojo extends org.apache.maven.plugin.AbstractMojo
Prepares camel-kamelet-main
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected org.codehaus.plexus.build.BuildContext
    build context to check changed files and mark them for refresh (used for m2e compatibility)
    protected File
    The camel-catalog directory
    protected File
     
    protected org.apache.maven.project.MavenProject
    The maven project.
    protected org.apache.maven.project.MavenProjectHelper
    Maven ProjectHelper.

    Fields inherited from interface org.apache.maven.plugin.Mojo

    ROLE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Execute goal.
    static void
    refresh(org.codehaus.plexus.build.BuildContext buildContext, Path file)
     
    protected void
     
    static boolean
    updateResource(org.codehaus.plexus.build.BuildContext buildContext, Path out, String data)
     
    protected boolean
    writeSourceIfChanged(String source, String filePath, String fileName, File outputDir)
     

    Methods inherited from class org.apache.maven.plugin.AbstractMojo

    getLog, getPluginContext, setLog, setPluginContext

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • project

      @Parameter(property="project", required=true, readonly=true) protected org.apache.maven.project.MavenProject project
      The maven project.
    • projectHelper

      @Component protected org.apache.maven.project.MavenProjectHelper projectHelper
      Maven ProjectHelper.
    • buildContext

      @Component protected org.codehaus.plexus.build.BuildContext buildContext
      build context to check changed files and mark them for refresh (used for m2e compatibility)
    • catalogDir

      @Parameter(defaultValue="${project.directory}/../../../catalog/camel-catalog") protected File catalogDir
      The camel-catalog directory
    • genDir

      @Parameter(defaultValue="src/generated/") protected File genDir
  • Constructor Details

    • PrepareKameletMainMojo

      public PrepareKameletMainMojo()
  • Method Details

    • 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...
    • updateKnownDependencies

      protected void updateKnownDependencies() throws Exception
      Throws:
      Exception
    • writeSourceIfChanged

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

      public static boolean updateResource(org.codehaus.plexus.build.BuildContext buildContext, Path out, String data)
    • refresh

      public static void refresh(org.codehaus.plexus.build.BuildContext buildContext, Path file)