Klasse TorqueGeneratorMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.apache.torque.generator.maven.TorqueGeneratorMojo
Alle implementierten Schnittstellen:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

@Mojo(name="generate", defaultPhase=GENERATE_SOURCES) public class TorqueGeneratorMojo extends org.apache.maven.plugin.AbstractMojo
Executes a unit of generation within the torque generator. $Id: TorqueGeneratorMojo.java 1917244 2024-04-21 13:54:24Z tv $
  • Konstruktordetails

    • TorqueGeneratorMojo

      public TorqueGeneratorMojo()
  • Methodendetails

    • execute

      public void execute() throws org.apache.maven.plugin.MojoExecutionException
      Configures and runs the Torque generator.
      Löst aus:
      org.apache.maven.plugin.MojoExecutionException
    • setPackaging

      public void setPackaging(String packaging)
      Sets the packaging.
      Parameter:
      packaging - the packaging, either "jar" or "directory"
    • setProjectRootDir

      public void setProjectRootDir(File projectRootDir)
      Sets the root directory of the project.
      Parameter:
      projectRootDir - the project root Directory.
    • setConfigDir

      public void setConfigDir(File configDir)
    • setConfigPackage

      public void setConfigPackage(String configPackage)
    • setDefaultOutputDir

      public void setDefaultOutputDir(File outputDir)
      Sets the default output directory for generated files.
      Parameter:
      outputDir - the default output directory, not null.
    • setOutputDir

      public void setOutputDir(String outputDirKey, String outputDir)
      Sets the target directory for files which are not generated each time anew.
      Parameter:
      outputDirKey - the key value
      outputDir - the target directory, or null to use the default.
    • setJarFile

      public void setJarFile(String jarFile)
      The path to the jar file to use.
      Parameter:
      jarFile - the jar file, or null.
    • setProject

      public void setProject(org.apache.maven.project.MavenProject project)
      Sets the maven project this mojo runs in.
      Parameter:
      project - the maven project this mojo runs in.
    • setDefaultOutputDirUsage

      public void setDefaultOutputDirUsage(String defaultOutputDirUsage)
      Sets the usage for the default output dir.
      Parameter:
      defaultOutputDirUsage - the new usage, not null.
    • setOutputDirUsage

      public void setOutputDirUsage(String outputDirKey, String outputDirUsage)
      Sets the usage for an output directory.
      Parameter:
      outputDirKey - key for the output directory, not null.
      outputDirUsage - the new usage, not null.
    • setSourceDir

      public void setSourceDir(File sourceDir)
      Sets the directory in which the source files are located.
      Parameter:
      sourceDir - the directory in which the source files are located.
    • setSourceIncludes

      public void setSourceIncludes(Set<String> sourceIncludes)
      Sets the pattern which files are included in the generation process.
      Parameter:
      sourceIncludes - a list containing the include patterns, or null if no include pattern should be used.
    • setSourceExcludes

      public void setSourceExcludes(Set<String> sourceExcludes)
      Sets the pattern which files are excluded in the generation process.
      Parameter:
      sourceExcludes - a list containing the exclude patterns, or null if no exclude pattern should be used.
    • setOverrideConfigDir

      public void setOverrideConfigDir(File overrideConfigDir)
      Sets the config directory overriding the template settings. If set, the settings of this directory are used as "child" and the "normal" settings are used as "parent".
      Parameter:
      overrideConfigDir - the config directory overriding the template settings, or null if the template settings will not be overridden.
    • setOverrideConfigPackage

      public void setOverrideConfigPackage(String overrideConfigPackage)
      Sets the config package of the project overriding the settings. If set, the settings of this directory are used as "child" and the "normal" settings are used as "parent".
      Parameter:
      overrideConfigPackage - the config package of the project overriding the settings, or null if the template settings will not be overridden.
    • setLoglevel

      public void setLoglevel(String loglevel)
      Sets the Loglevel to use in the generation process.
      Parameter:
      loglevel - the loglevel, must be one of trace, debug, info, warn or error, or null if the loglevel defined in the templates should be used.
    • setDefaultOutputEncoding

      public void setDefaultOutputEncoding(String defaultOutputEncoding)
      Sets the encoding which should be used for the files which do not have an output encoding set in the templates.
      Parameter:
      defaultOutputEncoding - the default output encoding, or null to use the generator default (the platform default encoding).
    • setOptions

      public void setOptions(Map<String,String> options)
      Sets additional options which can be added to the generation process. These options overrides existing options in the templates.
      Parameter:
      options - the overriding options, or null if no options should be overridden.
    • setCombineFiles

      public void setCombineFiles(Boolean combineFiles)
      Sets whether all source files should be combined into one single graph-
      Parameter:
      combineFiles - whether the source file should be combined.
    • setWorkDir

      public void setWorkDir(File workDir)
      Sets the work dir for e.g. merging sources.
      Parameter:
      workDir - the new workdir.
    • setOptionsFile

      public void setOptionsFile(File optionsFile)
      Sets a options file by which generation parameters can be set.
      Parameter:
      optionsFile - the path to the file containing the generation options.
    • setAddDebuggingInfoToOutput

      public void setAddDebuggingInfoToOutput(boolean addDebuggingInfoToOutput)
      Sets whether debugging information should be added to the output.
      Parameter:
      addDebuggingInfoToOutput - true if debugging information should be added to the output, false otherwise.
    • setRunOnlyOnSourceChange

      public void setRunOnlyOnSourceChange(boolean runOnlyOnSourceChange)
      Sets whether the generator should only run if one of the source files changes. The default value is false.
      Parameter:
      runOnlyOnSourceChange - true if the generator should only run if one of the source files changes, false if it should always run irrespective of changes in the source files.