Author: tchemit Date: 2012-07-05 18:08:24 +0200 (Thu, 05 Jul 2012) New Revision: 2384 Url: http://nuiton.org/repositories/revision/jaxx/2384 Log: fixes #930: Use maven-plugin-plugin 3 api Modified: trunk/jaxx-maven-plugin/src/main/java/org/nuiton/jaxx/plugin/AbstractGenerateHelpMojo.java trunk/jaxx-maven-plugin/src/main/java/org/nuiton/jaxx/plugin/AbstractJaxxMojo.java trunk/jaxx-maven-plugin/src/main/java/org/nuiton/jaxx/plugin/GenerateHelpFilesMojo.java trunk/jaxx-maven-plugin/src/main/java/org/nuiton/jaxx/plugin/GenerateHelpIdsMojo.java trunk/jaxx-maven-plugin/src/main/java/org/nuiton/jaxx/plugin/GenerateHelpMojo.java trunk/jaxx-maven-plugin/src/main/java/org/nuiton/jaxx/plugin/GenerateHelpSearchMojo.java trunk/jaxx-maven-plugin/src/main/java/org/nuiton/jaxx/plugin/GenerateMojo.java Modified: trunk/jaxx-maven-plugin/src/main/java/org/nuiton/jaxx/plugin/AbstractGenerateHelpMojo.java =================================================================== --- trunk/jaxx-maven-plugin/src/main/java/org/nuiton/jaxx/plugin/AbstractGenerateHelpMojo.java 2012-07-05 16:08:02 UTC (rev 2383) +++ trunk/jaxx-maven-plugin/src/main/java/org/nuiton/jaxx/plugin/AbstractGenerateHelpMojo.java 2012-07-05 16:08:24 UTC (rev 2384) @@ -27,10 +27,19 @@ import org.apache.commons.lang3.StringUtils; import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.plugins.annotations.Parameter; import org.nuiton.i18n.I18nUtil; -import java.io.*; -import java.util.*; +import java.io.BufferedReader; +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStreamReader; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Locale; +import java.util.Set; /** * Abstract Mojo to generate help stuff. @@ -45,52 +54,49 @@ * <p/> * The first locale given is the default locale. * - * @parameter expression="${jaxx.locales}" - * @required * @since 2.0.0 */ + @Parameter(property = "jaxx.locales", required = true) protected String locales; + /** * Where to generate helpIds files. * - * @parameter expression="${jaxx.outputHelpIds}" default-value="target/generated-sources/jaxx" - * @required * @since 1.3 */ + @Parameter(property = "jaxx.outputHelpIds", defaultValue = "target/generated-sources/jaxx", required = true) private File outputHelpIds; + /** * The store of helpIds generated by the goal {@link GenerateMojo} and then * used by the goal {@link GenerateHelpMojo}. * - * @parameter expression="${jaxx.helpIdsFilename}" default-value="helpIds.properties" - * @required * @since 1.3 */ + @Parameter(property = "jaxx.helpIdsFilename", defaultValue = "helpIds.properties", required = true) private String helpIdsFilename; + /** * The store of cumulate helpIds generated by the goal {@link GenerateMojo} * and then used by the goal {@link GenerateHelpMojo}. * - * @parameter expression="${jaxx.mergeHelpIdsFilename}" default-value="helpIds-all.properties" - * @required * @since 1.3 */ + @Parameter(property = "jaxx.mergeHelpIdsFilename", defaultValue = "helpIds-all.properties", required = true) private String mergeHelpIdsFilename; + /** * Flag to generate the search index. * - * @parameter expression="${jaxx.generateSearch}" default-value="true" - * @required * @since 1.3 */ + @Parameter(property = "jaxx.generateSearch", defaultValue = "true", required = true) protected boolean generateSearch; - /** - * Default locale (the first locale in {@link #localesToTreate}. - */ + + /** Default locale (the first locale in {@link #localesToTreate}. */ private Locale defaultLocale; - /** - * Locales to treate - */ + + /** Locales to treate */ private Locale[] localesToTreate; /** @@ -110,9 +116,7 @@ File source, String localePath) throws Exception; - /** - * Call back after doing all stuff for all locales declared - */ + /** Call back after doing all stuff for all locales declared */ protected abstract void postDoAction(); @Override Modified: trunk/jaxx-maven-plugin/src/main/java/org/nuiton/jaxx/plugin/AbstractJaxxMojo.java =================================================================== --- trunk/jaxx-maven-plugin/src/main/java/org/nuiton/jaxx/plugin/AbstractJaxxMojo.java 2012-07-05 16:08:02 UTC (rev 2383) +++ trunk/jaxx-maven-plugin/src/main/java/org/nuiton/jaxx/plugin/AbstractJaxxMojo.java 2012-07-05 16:08:24 UTC (rev 2384) @@ -24,6 +24,8 @@ */ package org.nuiton.jaxx.plugin; +import org.apache.maven.plugins.annotations.Component; +import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.project.MavenProject; import org.nuiton.io.MirroredFileUpdater; import org.nuiton.plugin.AbstractPlugin; @@ -44,41 +46,35 @@ public abstract void setTargetDirectory(File targetDirectory); - /** - * Dépendance du projet. - * - * @parameter default-value="${project}" - * @required - * @readonly - */ + /** Current maven project. */ + @Component private MavenProject project; /** - * Encoding pour la generation des fichiers. + * Encoding used for file generation. * <p/> * <b>Note:</b> If nothing is filled here, we will use the system * property {@code file.encoding}. * - * @parameter expression="${jaxx.encoding}" default-value="${project.build.sourceEncoding}" * @since 2.0.0 */ + @Parameter(property = "jaxx.encoding", defaultValue = "${project.build.sourceEncoding}") private String encoding; /** - * verbose flag + * Verbose flag. * - * @parameter expression="${jaxx.verbose}" default-value="false" * @since 1.3 */ + @Parameter(property = "jaxx.verbose", defaultValue = "false") private boolean verbose; /** - * to force generation of java source for any jaxx files with no timestamp checking. + * To force generation of java source for any jaxx files with no timestamp checking. * <p/> * By default, never force generation. - * - * @parameter expression="${jaxx.force}" default-value="false" */ + @Parameter(property = "jaxx.force", defaultValue = "false") private boolean force; /** @@ -86,9 +82,9 @@ * <p/> * By default, not active. * - * @parameter expression="${jaxx.generateHelp}" default-value="false" * @since 1.3 */ + @Parameter(property = "jaxx.generateHelp", defaultValue = "false") protected boolean generateHelp; @Override Modified: trunk/jaxx-maven-plugin/src/main/java/org/nuiton/jaxx/plugin/GenerateHelpFilesMojo.java =================================================================== --- trunk/jaxx-maven-plugin/src/main/java/org/nuiton/jaxx/plugin/GenerateHelpFilesMojo.java 2012-07-05 16:08:02 UTC (rev 2383) +++ trunk/jaxx-maven-plugin/src/main/java/org/nuiton/jaxx/plugin/GenerateHelpFilesMojo.java 2012-07-05 16:08:24 UTC (rev 2384) @@ -26,6 +26,11 @@ package org.nuiton.jaxx.plugin; import org.apache.commons.io.FileUtils; +import org.apache.maven.plugins.annotations.Execute; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; +import org.apache.maven.plugins.annotations.ResolutionScope; import org.nuiton.plugin.VelocityTemplateGenerator; import org.nuiton.util.SortedProperties; @@ -40,13 +45,13 @@ * Mojo to generate javax help files for your project. * * @author tchemit <chemit@codelutin.com> - * @goal generate-help-files - * @phase process-sources - * @requiresProject - * @requiresDependencyResolution compile - * @execute goal=generate-help-ids * @since 2.0.0 */ +@Mojo(name = "generate-help-files", + defaultPhase = LifecyclePhase.PROCESS_SOURCES, + requiresProject = true, + requiresDependencyResolution = ResolutionScope.COMPILE) +@Execute(goal = "generate-help-ids") public class GenerateHelpFilesMojo extends AbstractGenerateHelpMojo { protected static final String AUTOREMOVE_LINE = @@ -55,79 +60,80 @@ /** * The directory where to create or update help files. * - * @parameter expression="${jaxx.outputHelp}" default-value="${project.basedir}/src/main/help" - * @required * @since 2.0.0 */ + @Parameter(property = "jaxx.outputHelp", defaultValue = "${project.basedir}/src/main/help", required = true) protected File outputHelp; + /** * The name of the helpset to generate. * - * @parameter expression="${jaxx.helpsetName}" default-value="${project.artifactId}" - * @required * @since 1.3 */ + @Parameter(property = "jaxx.helpsetName", defaultValue = "${project.artifactId}", required = true) protected String helpsetName; + /** * The template used to generate helpset file. * <p/> * Must be an existing file or a ressource in class-path * - * @parameter expression="${jaxx.helpsetTemplate}" default-value="/defaultHelpSet.hs.vm" - * @required * @since 1.3 */ + @Parameter(property = "jaxx.helpsetTemplate", defaultValue = "/defaultHelpSet.hs.vm", required = true) protected File helpsetTemplate; + /** * The template used to generate helpset map file. * <p/> * Must be an existing file or a ressource in class-path * - * @parameter expression="${jaxx.mapTemplate}" default-value="/defaultMap.jhm.vm" - * @required * @since 1.3 */ + @Parameter(property = "jaxx.mapTemplate", defaultValue = "/defaultMap.jhm.vm", required = true) protected File mapTemplate; + /** * The template used to generate helpset index file. * <p/> * Must be an existing file or a ressource in class-path * - * @parameter expression="${jaxx.indexTemplate}" default-value="/defaultIndex.xml.vm" - * @required * @since 1.3 */ + @Parameter(property = "jaxx.indexTemplate", defaultValue = "/defaultIndex.xml.vm", required = true) protected File indexTemplate; + /** * The template used to generate helpset toc file. * <p/> * Must be an existing file or a ressource in class-path * - * @parameter expression="${jaxx.tocTemplate}" default-value="/defaultToc.xml.vm" - * @required * @since 1.3 */ + @Parameter(property = "jaxx.tocTemplate", defaultValue = "/defaultToc.xml.vm", required = true) protected File tocTemplate; + /** * The template used to generate helpset content file. * <p/> * Must be an existing file or a ressource in class-path * - * @parameter expression="${jaxx.contentTemplate}" default-value="/defaultContent.html.vm" - * @required * @since 1.3 */ + @Parameter(property = "jaxx.contentTemplate", defaultValue = "/defaultContent.html.vm", required = true) protected File contentTemplate; protected String mapFileName; + protected String indexFileName; + protected String tocFileName; + protected int touchedFiles; + protected File idsFile; - /** - * The help ids discovered. - */ + /** The help ids discovered. */ protected Properties helpIds; @Override @@ -303,7 +309,7 @@ boolean exist = f.exists(); if (exist) { // check if there is a autoremoveLine in content - String content = FileUtils.readFileToString( f ); + String content = FileUtils.readFileToString(f); if (!content.contains(AUTOREMOVE_LINE)) { // no regenerate marker detected, so skip this file if (isVerbose()) { Modified: trunk/jaxx-maven-plugin/src/main/java/org/nuiton/jaxx/plugin/GenerateHelpIdsMojo.java =================================================================== --- trunk/jaxx-maven-plugin/src/main/java/org/nuiton/jaxx/plugin/GenerateHelpIdsMojo.java 2012-07-05 16:08:02 UTC (rev 2383) +++ trunk/jaxx-maven-plugin/src/main/java/org/nuiton/jaxx/plugin/GenerateHelpIdsMojo.java 2012-07-05 16:08:24 UTC (rev 2384) @@ -26,6 +26,8 @@ import jaxx.compiler.decorators.HelpRootCompiledObjectDecorator; import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; import java.io.File; import java.util.Locale; @@ -37,17 +39,13 @@ * Created: 22 déc. 2009 * * @author tchemit <chemit@codelutin.com> - * @author tchemit <chemit@codelutin.com> - * @goal generate-help-ids - * @phase process-sources - * @requiresProject * @since 2.0.0 */ +@Mojo(name = "generate-help-ids", + defaultPhase = LifecyclePhase.PROCESS_SOURCES, requiresProject = true) public class GenerateHelpIdsMojo extends AbstractGenerateHelpMojo { - /** - * help ids to react. - */ + /** help ids to react. */ protected Set<String> helpIds; @Override Modified: trunk/jaxx-maven-plugin/src/main/java/org/nuiton/jaxx/plugin/GenerateHelpMojo.java =================================================================== --- trunk/jaxx-maven-plugin/src/main/java/org/nuiton/jaxx/plugin/GenerateHelpMojo.java 2012-07-05 16:08:02 UTC (rev 2383) +++ trunk/jaxx-maven-plugin/src/main/java/org/nuiton/jaxx/plugin/GenerateHelpMojo.java 2012-07-05 16:08:24 UTC (rev 2384) @@ -25,6 +25,11 @@ package org.nuiton.jaxx.plugin; +import org.apache.maven.plugins.annotations.Execute; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.ResolutionScope; + import java.io.File; import java.util.Locale; @@ -34,13 +39,13 @@ * This mojo will chain all others help mojo required. * * @author tchemit <chemit@codelutin.com> - * @goal generate-help - * @phase process-sources - * @requiresProject - * @requiresDependencyResolution compile - * @execute goal=generate-help-search * @since 1.3 */ +@Mojo(name = "generate-help", + defaultPhase = LifecyclePhase.PROCESS_SOURCES, + requiresProject = true, + requiresDependencyResolution = ResolutionScope.COMPILE) +@Execute(goal = "generate-help-search") public class GenerateHelpMojo extends AbstractGenerateHelpMojo { @Override Modified: trunk/jaxx-maven-plugin/src/main/java/org/nuiton/jaxx/plugin/GenerateHelpSearchMojo.java =================================================================== --- trunk/jaxx-maven-plugin/src/main/java/org/nuiton/jaxx/plugin/GenerateHelpSearchMojo.java 2012-07-05 16:08:02 UTC (rev 2383) +++ trunk/jaxx-maven-plugin/src/main/java/org/nuiton/jaxx/plugin/GenerateHelpSearchMojo.java 2012-07-05 16:08:24 UTC (rev 2384) @@ -26,6 +26,11 @@ package org.nuiton.jaxx.plugin; import com.sun.java.help.search.Indexer; +import org.apache.maven.plugins.annotations.Execute; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; +import org.apache.maven.plugins.annotations.ResolutionScope; import org.codehaus.plexus.util.FileUtils; import org.nuiton.plugin.PluginHelper; @@ -43,31 +48,29 @@ * your src directories (this is mainly binary files not to be stored in scm system)... * * @author tchemit <chemit@codelutin.com> - * @goal generate-help-search - * @phase process-sources - * @requiresProject - * @requiresDependencyResolution compile - * @execute goal=generate-help-files * @since 2.0.0 */ +@Mojo(name = "generate-help-search", + defaultPhase = LifecyclePhase.PROCESS_SOURCES, + requiresProject = true, + requiresDependencyResolution = ResolutionScope.COMPILE) +@Execute(goal = "generate-help-files") public class GenerateHelpSearchMojo extends AbstractGenerateHelpMojo { /** * The directory where to create or update help search index files. * - * @parameter expression="${jaxx.outputHelpSearch}" default-value="${project.basedir}/target/generated-sources/help" - * @required * @since 2.0.0 */ + @Parameter(property = "jaxx.outputHelpSearch", defaultValue = "${project.basedir}/target/generated-sources/help", required = true) protected File outputHelpSearch; /** * The directory where to pick content files to generate the index. * - * @parameter expression="${jaxx.inputHelp}" default-value="${project.basedir}/src/main/help" - * @required * @since 2.0.0 */ + @Parameter(property = "jaxx.inputHelp", defaultValue = "${project.basedir}/src/main/help", required = true) protected File inputHelp; protected String timestamp; Modified: trunk/jaxx-maven-plugin/src/main/java/org/nuiton/jaxx/plugin/GenerateMojo.java =================================================================== --- trunk/jaxx-maven-plugin/src/main/java/org/nuiton/jaxx/plugin/GenerateMojo.java 2012-07-05 16:08:02 UTC (rev 2383) +++ trunk/jaxx-maven-plugin/src/main/java/org/nuiton/jaxx/plugin/GenerateMojo.java 2012-07-05 16:08:24 UTC (rev 2384) @@ -29,11 +29,11 @@ import jaxx.compiler.CompilerConfiguration; import jaxx.compiler.I18nHelper; import jaxx.compiler.JAXXCompiler; -import jaxx.compiler.finalizers.JAXXCompilerFinalizer; import jaxx.compiler.JAXXEngine; import jaxx.compiler.JAXXFactory; import jaxx.compiler.beans.BeanInfoUtil; import jaxx.compiler.binding.DataBindingHelper; +import jaxx.compiler.finalizers.JAXXCompilerFinalizer; import jaxx.compiler.spi.DefaultInitializer; import jaxx.compiler.spi.Initializer; import jaxx.runtime.JAXXContext; @@ -42,6 +42,11 @@ import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.Component; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; +import org.apache.maven.plugins.annotations.ResolutionScope; import org.nuiton.i18n.I18n; import org.nuiton.io.MirroredFileUpdater; import org.nuiton.plugin.PluginHelper; @@ -59,158 +64,139 @@ * Generates some java code from jaxx files. * * @author tchemit <chemit@codelutin.com> - * @goal generate - * @phase process-sources - * @requiresDependencyResolution compile - * @requiresProject */ +@Mojo(name = "generate", defaultPhase = LifecyclePhase.PROCESS_SOURCES, + requiresDependencyResolution = ResolutionScope.COMPILE, requiresProject = true) public class GenerateMojo extends AbstractJaxxMojo implements CompilerConfiguration { /** Default includes to use, if none provided */ private static final String[] INCLUDES = {"**/*.jaxx", "**/*.css"}; /** - * Repertoire sources des fichiers jaxx a generer. - * - * @parameter expression="${jaxx.src}" default-value="${basedir}/src/main/java" + * Directory where jaxx files are located. */ + @Parameter(property = "jaxx.src", defaultValue = "${basedir}/src/main/java") protected File src; /** - * Repertoire de destination des fichiers java a generer. - * - * @parameter expression="${jaxx.outJava}" default-value="${basedir}/target/generated-sources/java" + * Where to generate java files. */ + @Parameter(property = "jaxx.outJava", defaultValue = "${basedir}/target/generated-sources/java") protected File outJava; /** - * pour filter les fichiers a traiter - * - * @parameter expression="${jaxx.includes}" + * To filter file to treat. */ + @Parameter(property = "jaxx.includes") protected String[] includes; /** - * pour filter les fichiers a ne pas traiter - * - * @parameter expression="${jaxx.excludes}" + * To filter files to NOt treat. */ + @Parameter(property = "jaxx.excludes") protected String[] excludes; /** - * Le compilateur à utiliser (par défaut celui de Swing) - * - * @parameter expression="${jaxx.compilerFQN}" default-value="jaxx.compiler.JAXXCompiler" + * FQN of compiler to use (by default swing one). */ + @Parameter(property = "jaxx.compilerFQN", defaultValue = "jaxx.compiler.JAXXCompiler", required = true) protected String compilerFQN; /** - * the name of implementation of {@link JAXXContext}to be used on {@link - * JAXXObject}. + * The name of implementation of {@link JAXXContext}to be used on {@link JAXXObject}. * <p/> * Must not be abstract. - * - * @parameter expression="${jaxx.jaxxContextFQN}" default-value="jaxx.runtime.context.DefaultJAXXContext" - * @required */ + @Parameter(property = "jaxx.jaxxContextFQN", defaultValue = "jaxx.runtime.context.DefaultJAXXContext", required = true) protected String jaxxContextFQN; /** - * the FQN of the ui to use for error notification. + * The FQN of the ui to use for error notification. * <p/> * If not given, will use the one defined in validator - * - * @parameter expression="${jaxx.defaultErrorUIFQN}" */ + @Parameter(property = "jaxx.defaultErrorUIFQN") protected String defaultErrorUIFQN; /** - * the FQN of the ui to use for error notification. + * The FQN of the ui to use for error notification. * <p/> * If not given, will use the one defined in validator * - * @parameter expression="${jaxx.defaultDecoratorFQN}" - * default-value="jaxx.compiler.decorators.DefaultCompiledObjectDecorator" * @see CompiledObjectDecorator */ + @Parameter(property = "jaxx.defaultDecoratorFQN", defaultValue = "jaxx.compiler.decorators.DefaultCompiledObjectDecorator") protected String defaultDecoratorFQN; /** - * flag to include in compiler classpath the java sources directories (src + * Flag to include in compiler classpath the java sources directories (src * and outJava). * <p/> * By default, false. - * - * @parameter expression="${jaxx.addSourcesToClassPath}" - * default-value="false" */ + @Parameter(property = "jaxx.addSourcesToClassPath", defaultValue = "false") protected boolean addSourcesToClassPath; /** - * flag to include in compiler classpath the java resources directories (src + * Flag to include in compiler classpath the java resources directories (src * and outJava). * <p/> * By default, false. * - * @parameter expression="${jaxx.addResourcesToClassPath}" - * default-value="false" * @since 1.6.0 */ + @Parameter(property = "jaxx.addResourcesToClassPath", defaultValue = "false") protected boolean addResourcesToClassPath; /** - * flag to include in compiler classpath the compile class-path (can only be + * Flag to include in compiler classpath the compile class-path (can only be * used in a test phase). * <p/> * By default, false. * - * @parameter expression="${jaxx.addCompileClassPath}" - * default-value="false" * @since 1.6.0 */ + @Parameter(property = "jaxx.addCompileClassPath", defaultValue = "false") protected boolean addCompileClassPath; /** - * flag to include in compiler classpath the project compile classpath. + * Flag to include in compiler classpath the project compile classpath. * <p/> * By default, false. - * - * @parameter expression="${jaxx.addProjectClassPath}" - * default-value="false" */ + @Parameter(property = "jaxx.addProjectClassPath", defaultValue = "false") protected boolean addProjectClassPath; /** - * A flag to mark themojo to be used in a test phase. This will permits to + * A flag to mark the mojo to be used in a test phase. This will permits to * add generated sources in test compile roots. * - * @parameter expression="${jaxx.testPhase}" default-value="false" * @since 1.6.0 */ + @Parameter(property = "jaxx.testPhase", defaultValue = "false") protected boolean testPhase; /** - * to make compiler i18nable, says add the {@link I18n#_(String, Object...)} + * To make compiler i18nable, says add the {@link I18n#_(String, Object...)} * method invocation on {@link I18nHelper#I18N_ATTRIBUTES} attributes. * - * @parameter expression="${jaxx.i18nable}" default-value="true" * @see I18nHelper */ + @Parameter(property = "jaxx.i18nable", defaultValue = "true") protected boolean i18nable; /** - * pour optimizer le code compile ou genere ? - * - * @parameter expression="${jaxx.optimize}" default-value="false" + * To optimize generated code. */ + @Parameter(property = "jaxx.optimize", defaultValue = "false") protected boolean optimize; /** * To auto import css files for a jaxx file. * - * @parameter expression="${jaxx.autoImportCss}" default-value="false" * @since 2.0.2 */ + @Parameter(property = "jaxx.autoImportCss", defaultValue = "false") protected boolean autoImportCss; /** @@ -220,31 +206,29 @@ * <b>Warning:</b> This option will be removed in version 3.0 or at least * default value will become {@code false}. * - * @parameter expression="${jaxx.autoRecurseInCss}" default-value="true" * @since 2.0.2 */ + @Parameter(property = "jaxx.autoRecurseInCss", defaultValue = "true") protected boolean autoRecurseInCss; /** - * flag to add logger to each generated jaxx file. + * Flag to add logger to each generated jaxx file. * <p/> * By default, always add it. - * - * @parameter expression="${jaxx.addLogger}" default-value="true" */ + @Parameter(property = "jaxx.addLogger", defaultValue = "true") protected boolean addLogger; /** - * flag to keep compilers after the generate operation (usefull for tests. + * Flag to keep compilers after the generate operation (usefull for tests. * <p/> * By default, always reset. - * - * @parameter expression="${jaxx.resetAfterCompile}" default-value="true" */ + @Parameter(property = "jaxx.resetAfterCompile", defaultValue = "true") protected boolean resetAfterCompile; /** - * extra path to be added in {@link Introspector#setBeanInfoSearchPath(String[])}. + * Extra path to be added in {@link Introspector#setBeanInfoSearchPath(String[])}. * <p/> * add beanInfoSearchPath to be registred by {@link BeanInfoUtil#addJaxxBeanInfoPath(String...)} * <p/> @@ -252,33 +236,28 @@ * <p/> * <p/> * This permit to use real beanInfo of imported graphic libraries. - * - * @parameter expression="${jaxx.beanInfoSearchPath}" */ + @Parameter(property = "jaxx.beanInfoSearchPath") protected String[] beanInfoSearchPath; /** - * list of fqn of class toimport for all generated jaxx files - * - * @parameter expression="${jaxx.extraImportList}" + * List of fqn of class toimport for all generated jaxx files. */ + @Parameter(property = "jaxx.extraImportList") protected String extraImportList; /** - * a flag to use UIManager to retreave icons. - * - * @parameter expression="${jaxx.useUIManagerForIcon}" - * default-value="false" + * A flag to use UIManager to retreave icons. */ + @Parameter(property = "jaxx.useUIManagerForIcon", defaultValue = "false") protected boolean useUIManagerForIcon; /** * flag to activate profile mode. * <p/> * By default, not active. - * - * @parameter expression="${jaxx.profile}" default-value="false" */ + @Parameter(property = "jaxx.profile", defaultValue = "false") protected boolean profile; /** @@ -286,9 +265,9 @@ * <p/> * By default, do not show them. * - * @parameter expression="${jaxx.showBinding}" default-value="false" * @since 2.0.0 */ + @Parameter(property = "jaxx.showBinding", defaultValue = "false") protected boolean showBinding; /** @@ -296,9 +275,9 @@ * <p/> * By default, use the JAXX implementation {@link JAXXHelpBroker}. * - * @parameter expression="${jaxx.helpBrokerFQN}" default-value="jaxx.runtime.swing.help.JAXXHelpBroker" * @since 1.3 */ + @Parameter(property = "jaxx.helpBrokerFQN", defaultValue = "jaxx.runtime.swing.help.JAXXHelpBroker") protected String helpBrokerFQN; /** @@ -306,11 +285,35 @@ * <p/> * By default, do not trace it. * - * @parameter expression="${jaxx.showClassDescriptorLoading}" default-value="false" * @since 2.4 */ + @Parameter(property = "jaxx.showClassDescriptorLoading", defaultValue = "false") private boolean showClassDescriptorLoading; + /** + * Decorators available in engine. + * + * @since 2.0.2 + */ + @Component(role = CompiledObjectDecorator.class) + protected Map<String, CompiledObjectDecorator> decorators; + + /** + * Finalizers available in engine. + * + * @since 2.0.2 + */ + @Component(role = JAXXCompilerFinalizer.class) + protected Map<String, JAXXCompilerFinalizer> finalizers; + + /** + * Initializers available to init engine. + * + * @since 2.0.2 + */ + @Component(role = Initializer.class) + protected Map<String, Initializer> initializers; + /** detected jaxx files in {@link #init()} method */ protected String[] files; @@ -342,30 +345,6 @@ /** customized classloader to use in engine */ protected ClassLoader cl; - /** - * decorators available in engine. - * - * @component role="jaxx.compiler.CompiledObjectDecorator" - * @since 2.0.2 - */ - protected Map<String, CompiledObjectDecorator> decorators; - - /** - * Finalizers available in engine. - * - * @component role="jaxx.compiler.finalizers.JAXXCompilerFinalizer" - * @since 2.0.2 - */ - protected Map<String, JAXXCompilerFinalizer> finalizers; - - /** - * initializers availables to init engine. - * - * @component role="jaxx.compiler.spi.Initializer" - * @since 2.0.2 - */ - protected Map<String, Initializer> initializers; - /** JAXX engine */ private JAXXEngine engine;