Class 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 Detail

      • src

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

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

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

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

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

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

        @Parameter(property="jaxx.defaultErrorUIFQN")
        protected 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 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.
      • extraImportList

        @Parameter(property="jaxx.extraImportList")
        protected 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 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 String validatorFactoryFQN
        the FQN of validator factory. By default, use the JAXX implementation SwingValidator.
        Since:
        2.6
      • files

        protected 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 ClassLoader cl
        customized classloader to use in engine
    • Constructor Detail

      • GenerateMojo

        public GenerateMojo()