@Mojo(name="generate",
defaultPhase=PROCESS_SOURCES,
requiresDependencyResolution=COMPILE,
requiresProject=true)
public class GenerateMojo
extends AbstractJaxxMojo
implements CompilerConfiguration
AbstractJaxxMojo.JaxxFileUpdater| Modifier and Type | Field and Description |
|---|---|
protected boolean |
addCompileClassPath
Flag to include in compiler classpath the compile class-path (can only be
used in a test phase).
|
protected boolean |
addLogger
Flag to add logger to each generated jaxx file.
|
protected boolean |
addProjectClassPath
Flag to include in compiler classpath the project compile classpath.
|
protected boolean |
addResourcesToClassPath
Flag to include in compiler classpath the java resources directories (src
and outJava).
|
protected boolean |
addSourcesToClassPath
Flag to include in compiler classpath the java sources directories (src
and outJava).
|
protected boolean |
autoRecurseInCss
To let jaxx recurses in css when a JAXX Object auto import css files
for a jaxx file.
|
protected String[] |
beanInfoSearchPath
Extra path to be added in
Introspector.setBeanInfoSearchPath(String[]). |
protected ClassLoader |
cl
customized classloader to use in engine
|
protected String |
compilerFQN
FQN of compiler to use (by default swing one).
|
protected Map<String,CompiledObjectDecorator> |
decorators
Decorators available in engine.
|
protected String |
defaultDecoratorFQN
The FQN of the ui to use for error notification.
|
protected String |
defaultErrorUIFQN
The FQN of the ui to use for error notification.
|
protected String[] |
excludes
To filter files to NOt treat.
|
protected String |
extraImportList
List of fqn of class toimport for all generated jaxx files.
|
protected String[] |
files
detected jaxx files in
init() method |
protected Map<String,JAXXCompilerFinalizer> |
finalizers
Finalizers available in engine.
|
protected String |
helpBrokerFQN
the FQN of help broker
By default, use the JAXX implementation
JAXXHelpBroker. |
protected boolean |
i18nable
To make compiler i18nable, says add the
I18n.t(String, Object...) |
protected String[] |
includes
To filter file to treat.
|
protected Map<String,Initializer> |
initializers
Initializers available to init engine.
|
protected String |
jaxxContextFQN
The name of implementation of
JAXXContextto be used on JAXXObject. |
protected boolean |
optimize
To optimize generated code.
|
protected File |
outJava
Where to generate java files.
|
protected boolean |
profile
flag to activate profile mode.
|
protected boolean |
resetAfterCompile
Flag to keep compilers after the generate operation (usefull for tests.
|
protected boolean |
showBinding
To show detected bindings.
|
protected File |
src
Directory where jaxx files are located.
|
protected boolean |
testPhase
A flag to mark the mojo to be used in a test phase.
|
protected org.nuiton.io.MirroredFileUpdater |
updater
file updater used to detect jaxx files.
|
protected boolean |
useUIManagerForIcon
A flag to use UIManager to retreave icons.
|
protected String |
validatorFactoryFQN
the FQN of validator factory.
|
generateHelpDEFAULT_CSS_EXTENSION| Constructor and Description |
|---|
GenerateMojo() |
checkPackaging, getEncoding, getLastModified, getProject, isForce, isVerbose, setEncoding, setForce, setProject, setVerboseacceptPackaging, addCompileSourceRoots, addDirectoryToUrlsList, addResourceDir, addTestCompileSourceRoots, addTestResourceDir, addUrlToUrlsList, afterExecute, backupFile, checkEncoding, checkResource, checkRunOnceDone, copyFile, createDirectoryIfNecessary, createNewFile, deleteFile, execute, getBackupFile, getFileFromBasedir, getFilesToTreate, getFilesToTreateForRoots, getRootProject, getTemplate, hasClassPath, initClassLoader, isExecutionRoot, isFileNewerThanPomFile, needInvoke, needInvoke, rejectPackaging, removeCompileSourceRoots, removeTestCompileSourceRoots, renameFile, writeFilegetLog, getPluginContext, setLog, setPluginContextclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetEncoding, isVerbose@Parameter(property="jaxx.src",
defaultValue="${basedir}/src/main/java")
protected File src
@Parameter(property="jaxx.outJava",
defaultValue="${basedir}/target/generated-sources/java")
protected File outJava
@Parameter(property="jaxx.includes") protected String[] includes
@Parameter(property="jaxx.excludes") protected String[] excludes
@Parameter(property="jaxx.compilerFQN",
defaultValue="org.nuiton.jaxx.compiler.JAXXCompiler",
required=true)
protected String compilerFQN
@Parameter(property="jaxx.jaxxContextFQN",
defaultValue="org.nuiton.jaxx.runtime.context.DefaultJAXXContext",
required=true)
protected String jaxxContextFQN
JAXXContextto be used on JAXXObject.
Must not be abstract.@Parameter(property="jaxx.defaultErrorUIFQN",
defaultValue="org.nuiton.jaxx.validator.swing.ui.ImageValidationUI")
protected String defaultErrorUIFQN
@Parameter(property="jaxx.defaultDecoratorFQN",
defaultValue="org.nuiton.jaxx.compiler.decorators.DefaultCompiledObjectDecorator")
protected String defaultDecoratorFQN
CompiledObjectDecorator@Parameter(property="jaxx.addSourcesToClassPath",
defaultValue="true")
protected boolean addSourcesToClassPath
@Parameter(property="jaxx.addResourcesToClassPath",
defaultValue="false")
protected boolean addResourcesToClassPath
@Parameter(property="jaxx.addCompileClassPath",
defaultValue="false")
protected boolean addCompileClassPath
@Parameter(property="jaxx.addProjectClassPath",
defaultValue="true")
protected boolean addProjectClassPath
@Parameter(property="jaxx.testPhase",
defaultValue="false")
protected boolean testPhase
@Parameter(property="jaxx.i18nable",
defaultValue="true")
protected boolean i18nable
I18n.t(String, Object...)
method invocation on I18nHelper.I18N_ATTRIBUTES attributes.I18nHelper@Parameter(property="jaxx.optimize",
defaultValue="false")
protected boolean optimize
@Parameter(property="jaxx.autoRecurseInCss",
defaultValue="false")
protected boolean autoRecurseInCss
false.@Parameter(property="jaxx.addLogger",
defaultValue="true")
protected boolean addLogger
@Parameter(property="jaxx.resetAfterCompile",
defaultValue="true")
protected boolean resetAfterCompile
@Parameter(property="jaxx.beanInfoSearchPath") protected String[] beanInfoSearchPath
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.@Parameter(property="jaxx.extraImportList") protected String extraImportList
@Parameter(property="jaxx.useUIManagerForIcon",
defaultValue="true")
protected boolean useUIManagerForIcon
@Parameter(property="jaxx.profile",
defaultValue="false")
protected boolean profile
@Parameter(property="jaxx.showBinding",
defaultValue="false")
protected boolean showBinding
@Parameter(property="jaxx.helpBrokerFQN",
defaultValue="org.nuiton.jaxx.runtime.swing.help.JAXXHelpBroker")
protected String helpBrokerFQN
JAXXHelpBroker.@Parameter(property="jaxx.validatorFactoryFQN",
defaultValue="org.nuiton.jaxx.validator.swing.SwingValidator")
protected String validatorFactoryFQN
SwingValidator.@Component(role=org.nuiton.jaxx.compiler.CompiledObjectDecorator.class) protected Map<String,CompiledObjectDecorator> decorators
@Component(role=org.nuiton.jaxx.compiler.finalizers.JAXXCompilerFinalizer.class) protected Map<String,JAXXCompilerFinalizer> finalizers
@Component(role=org.nuiton.jaxx.compiler.spi.Initializer.class) protected Map<String,Initializer> initializers
protected org.nuiton.io.MirroredFileUpdater updater
AbstractJaxxMojo.verbose flag is on, will ne be usedprotected ClassLoader cl
public void init()
throws Exception
init in class org.nuiton.plugin.AbstractPluginExceptionprotected boolean checkSkip()
checkSkip in class org.nuiton.plugin.AbstractPluginpublic void doAction()
throws Exception
doAction in class org.nuiton.plugin.AbstractPluginExceptionpublic File getTargetDirectory()
getTargetDirectory in interface CompilerConfigurationgetTargetDirectory in class AbstractJaxxMojopublic void setTargetDirectory(File targetDirectory)
setTargetDirectory in class AbstractJaxxMojopublic boolean getOptimize()
getOptimize in interface CompilerConfigurationpublic boolean isAutoRecurseInCss()
isAutoRecurseInCss in interface CompilerConfigurationpublic boolean isI18nable()
isI18nable in interface CompilerConfigurationpublic boolean isUseUIManagerForIcon()
isUseUIManagerForIcon in interface CompilerConfigurationpublic boolean isAddLogger()
isAddLogger in interface CompilerConfigurationpublic boolean isShowClassDescriptorLoading()
isShowClassDescriptorLoading in interface CompilerConfigurationpublic boolean isAddAutoHandlerUI()
isAddAutoHandlerUI in interface CompilerConfigurationpublic void setAddAutoHandlerUI(boolean addAutoHandlerUI)
setAddAutoHandlerUI in interface CompilerConfigurationpublic boolean isGenerateMissingIdsAndStyleClassesInCss()
isGenerateMissingIdsAndStyleClassesInCss in interface CompilerConfigurationpublic void setGenerateMissingIdsAndStyleClassesInCss(boolean generateMissingIdsAndStyleClassesInCss)
setGenerateMissingIdsAndStyleClassesInCss in interface CompilerConfigurationpublic Class<? extends JAXXContext> getJaxxContextClass()
getJaxxContextClass in interface CompilerConfigurationpublic String[] getExtraImports()
getExtraImports in interface CompilerConfigurationpublic boolean isResetAfterCompile()
isResetAfterCompile in interface CompilerConfigurationpublic boolean isOptimize()
isOptimize in interface CompilerConfigurationpublic Class<?> getDefaultErrorUI()
getDefaultErrorUI in interface CompilerConfigurationpublic ClassLoader getClassLoader()
getClassLoader in interface CompilerConfigurationpublic Class<? extends JAXXCompiler> getCompilerClass()
getCompilerClass in interface CompilerConfigurationpublic Class<? extends CompiledObjectDecorator> getDefaultDecoratorClass()
getDefaultDecoratorClass in interface CompilerConfigurationpublic boolean isProfile()
isProfile in interface CompilerConfigurationpublic boolean isGenerateHelp()
isGenerateHelp in interface CompilerConfigurationpublic String getHelpBrokerFQN()
getHelpBrokerFQN in interface CompilerConfigurationpublic String getValidatorFactoryFQN()
getValidatorFactoryFQN in interface CompilerConfigurationpublic Map<String,CompiledObjectDecorator> getDecorators()
getDecorators in interface CompilerConfigurationpublic Map<String,JAXXCompilerFinalizer> getFinalizers()
getFinalizers in interface CompilerConfigurationpublic Map<String,Initializer> getInitializers()
getInitializers in interface CompilerConfigurationpublic File getCommonCss()
getCommonCss in interface CompilerConfigurationpublic String getCssExtension()
getCssExtension in interface CompilerConfigurationpublic JAXXEngine getEngine()
protected void fixCompileSourceRoots()
protected void report(JAXXEngine engine)
Copyright © 2008–2017 Ultreia.io. All rights reserved.