Class GenerateMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.nuiton.plugin.AbstractPlugin
org.nuiton.jaxx.plugin.AbstractJaxxMojo
org.nuiton.jaxx.plugin.GenerateMojo
All Implemented Interfaces:
CompilerConfiguration, org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo, org.nuiton.plugin.Plugin, org.nuiton.plugin.PluginWithEncoding

@Mojo(name="generate",
      defaultPhase=PROCESS_SOURCES,
      requiresDependencyResolution=COMPILE,
      requiresProject=true)
public class GenerateMojo
extends AbstractJaxxMojo
implements CompilerConfiguration
Generates some java code from jaxx files.
Author:
Tony Chemit - chemit@codelutin.com
  • Field Details

    • src

      @Parameter(property="jaxx.src", defaultValue="${basedir}/src/main/java") protected java.io.File src
      Directory where jaxx files are located.
    • outJava

      @Parameter(property="jaxx.outJava", defaultValue="${basedir}/target/generated-sources/java") protected java.io.File outJava
      Where to generate java files.
    • includes

      @Parameter(property="jaxx.includes") protected java.lang.String[] includes
      To filter file to treat.
    • excludes

      @Parameter(property="jaxx.excludes") protected java.lang.String[] excludes
      To filter files to NOt treat.
    • compilerFQN

      @Parameter(property="jaxx.compilerFQN", defaultValue="jaxx.compiler.JAXXCompiler", required=true) protected java.lang.String compilerFQN
      FQN of compiler to use (by default swing one).
    • jaxxContextFQN

      @Parameter(property="jaxx.jaxxContextFQN", defaultValue="jaxx.runtime.context.DefaultJAXXContext", required=true) protected java.lang.String jaxxContextFQN
      The name of implementation of JAXXContextto be used on JAXXObject. Must not be abstract.
    • defaultErrorUIFQN

      @Parameter(property="jaxx.defaultErrorUIFQN") protected java.lang.String defaultErrorUIFQN
      The FQN of the ui to use for error notification. If not given, will use the one defined in validator
    • defaultDecoratorFQN

      @Parameter(property="jaxx.defaultDecoratorFQN", defaultValue="jaxx.compiler.decorators.DefaultCompiledObjectDecorator") protected java.lang.String defaultDecoratorFQN
      The FQN of the ui to use for error notification. If not given, will use the one defined in validator
      See Also:
      CompiledObjectDecorator
    • addSourcesToClassPath

      @Parameter(property="jaxx.addSourcesToClassPath", defaultValue="false") protected boolean addSourcesToClassPath
      Flag to include in compiler classpath the java sources directories (src and outJava). By default, false.
    • addResourcesToClassPath

      @Parameter(property="jaxx.addResourcesToClassPath", defaultValue="false") protected boolean addResourcesToClassPath
      Flag to include in compiler classpath the java resources directories (src and outJava). By default, false.
      Since:
      1.6.0
    • addCompileClassPath

      @Parameter(property="jaxx.addCompileClassPath", defaultValue="false") protected boolean addCompileClassPath
      Flag to include in compiler classpath the compile class-path (can only be used in a test phase). By default, false.
      Since:
      1.6.0
    • addProjectClassPath

      @Parameter(property="jaxx.addProjectClassPath", defaultValue="false") protected boolean addProjectClassPath
      Flag to include in compiler classpath the project compile classpath. By default, false.
    • testPhase

      @Parameter(property="jaxx.testPhase", defaultValue="false") protected boolean testPhase
      A flag to mark the mojo to be used in a test phase. This will permits to add generated sources in test compile roots.
      Since:
      1.6.0
    • i18nable

      @Parameter(property="jaxx.i18nable", defaultValue="true") protected boolean i18nable
      To make compiler i18nable, says add the I18n.t(String, Object...) method invocation on I18nHelper.I18N_ATTRIBUTES attributes.
      See Also:
      I18nHelper
    • optimize

      @Parameter(property="jaxx.optimize", defaultValue="false") protected boolean optimize
      To optimize generated code.
    • autoRecurseInCss

      @Parameter(property="jaxx.autoRecurseInCss", defaultValue="true") protected boolean autoRecurseInCss
      To let jaxx recurses in css when a JAXX Object auto import css files for a jaxx file. Warning: This option will be removed in version 3.0 or at least default value will become false.
      Since:
      2.0.2
    • addLogger

      @Parameter(property="jaxx.addLogger", defaultValue="true") protected boolean addLogger
      Flag to add logger to each generated jaxx file. By default, always add it.
    • resetAfterCompile

      @Parameter(property="jaxx.resetAfterCompile", defaultValue="true") protected boolean resetAfterCompile
      Flag to keep compilers after the generate operation (usefull for tests. By default, always reset.
    • beanInfoSearchPath

      @Parameter(property="jaxx.beanInfoSearchPath") protected java.lang.String[] beanInfoSearchPath
      Extra path to be added in Introspector.setBeanInfoSearchPath(String[]). add beanInfoSearchPath to be registred by BeanInfoUtil.addJaxxBeanInfoPath(String...) and then will be use by DefaultInitializer.initialize(). This permit to use real beanInfo of imported graphic libraries.
    • extraImportList

      @Parameter(property="jaxx.extraImportList") protected java.lang.String extraImportList
      List of fqn of class toimport for all generated jaxx files.
    • useUIManagerForIcon

      @Parameter(property="jaxx.useUIManagerForIcon", defaultValue="false") protected boolean useUIManagerForIcon
      A flag to use UIManager to retreave icons.
    • profile

      @Parameter(property="jaxx.profile", defaultValue="false") protected boolean profile
      flag to activate profile mode. By default, not active.
    • showBinding

      @Parameter(property="jaxx.showBinding", defaultValue="false") protected boolean showBinding
      To show detected bindings. By default, do not show them.
      Since:
      2.0.0
    • helpBrokerFQN

      @Parameter(property="jaxx.helpBrokerFQN", defaultValue="jaxx.runtime.swing.help.JAXXHelpBroker") protected java.lang.String helpBrokerFQN
      the FQN of help broker By default, use the JAXX implementation JAXXHelpBroker.
      Since:
      1.3
    • validatorFactoryFQN

      @Parameter(property="jaxx.validatorFactoryFQN", defaultValue="jaxx.runtime.validator.swing.SwingValidator") protected java.lang.String validatorFactoryFQN
      the FQN of validator factory. By default, use the JAXX implementation SwingValidator.
      Since:
      2.6
    • decorators

      @Component(role=jaxx.compiler.CompiledObjectDecorator.class) protected java.util.Map<java.lang.String,​CompiledObjectDecorator> decorators
      Decorators available in engine.
      Since:
      2.0.2
    • finalizers

      @Component(role=jaxx.compiler.finalizers.JAXXCompilerFinalizer.class) protected java.util.Map<java.lang.String,​JAXXCompilerFinalizer> finalizers
      Finalizers available in engine.
      Since:
      2.0.2
    • initializers

      @Component(role=jaxx.compiler.spi.Initializer.class) protected java.util.Map<java.lang.String,​Initializer> initializers
      Initializers available to init engine.
      Since:
      2.0.2
    • files

      protected java.lang.String[] files
      detected jaxx files in init() method
    • updater

      protected org.nuiton.io.MirroredFileUpdater updater
      file updater used to detect jaxx files. Note: if AbstractJaxxMojo.verbose flag is on, will ne be used
    • cl

      protected java.lang.ClassLoader cl
      customized classloader to use in engine
  • Constructor Details

    • GenerateMojo

      public GenerateMojo()
  • Method Details