Class GenerateMojo

  • All Implemented Interfaces:
    org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo, ChainedFileWriterConfiguration, org.nuiton.plugin.Plugin, org.nuiton.plugin.PluginWithEncoding

    @Mojo(name="generate",
          requiresDependencyResolution=COMPILE)
    public class GenerateMojo
    extends org.nuiton.plugin.AbstractPlugin
    implements ChainedFileWriterConfiguration, org.nuiton.plugin.PluginWithEncoding
    Eugene generator plugin (a.k.a generate mojo) Fill inputs and mojo will chained needed writer.
    Since:
    2.5
    Author:
    Tony Chemit - chemit@codelutin.com
    • Field Detail

      • inputs

        @Parameter(property="eugene.inputs",
                   required=true)
        protected String[] inputs
        Inputs files to used to generate the required model files. An include has the following pattern :
          writer:
         
        when you want to use a specific writer with his default io values. Can also write :
          [writer:]directory:includes
         
        where includes is the pattern to find files from the directory given and must be terminated by the extension of files. Specifying the writer can be usefull when you want to use a writer for an unknown extension by any writer. Example :
         <inputs>
             <input>zargo:</input>
             <input>src/main/xmi2:**\/*.zargo</input>
             <input>zargo:src/main/xmi:**\/*.zargo2</input>
         </inputs>
         
        Note: If your using a single input, you can just write :
         <inputs>zargo</inputs>
         
        Since:
        2.0.0
      • skipInputs

        @Parameter(property="eugene.skipInputs")
        protected String skipInputs
        List of input (protocol) not to treate separated by comma. Example :
         <skipInputs>xmi</skipInputs>
         <skipInputs>xmi,model</skipInputs>
         
        Since:
        2.0.0
      • outputDirectory

        @Parameter(property="eugene.outputDirectory",
                   defaultValue="target/generated-sources",
                   required=true)
        protected File outputDirectory
        Where to generate files.
        Since:
        2.0.0
      • extractDirectory

        @Parameter(property="eugene.extractDirectory",
                   defaultValue="target/extracted-sources",
                   required=true)
        protected File extractDirectory
        Where to copy extracted files (when using class-path data).
        Since:
        2.1.3
      • overwrite

        @Parameter(property="eugene.overwrite",
                   defaultValue="false")
        protected boolean overwrite
        Ecrase les fichiers générés.
        Since:
        2.0.0
      • verbose

        @Parameter(property="eugene.verbose",
                   defaultValue="${maven.verbose}")
        protected boolean verbose
        Pour activer le mode verbeux.
        Since:
        2.0.0
      • encoding

        @Parameter(property="eugene.encoding",
                   defaultValue="${project.build.sourceEncoding}")
        protected String encoding
        Encoding to be used for generation of files. Note: If nothing is filled here, we will use the system property file.encoding.
        Since:
        2.0.0
      • testPhase

        @Parameter(property="eugene.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:
        2.0.0
      • modelType

        @Parameter(property="eugene.modelType",
                   defaultValue="objectmodel",
                   required=true)
        protected String modelType
        The type of model to be used. By default, use an objectmodel.
        Since:
        2.0.0
      • properties

        @Parameter
        protected Map<String,​Object> properties
        Properties to pass to writer.
        Since:
        2.0.0
      • dryRun

        @Parameter(property="eugene.dryRun",
                   defaultValue="false")
        protected boolean dryRun
        Ne génère rien, analyse juste la configuration.
        Since:
        2.0.0
      • fullPackagePath

        @Parameter(property="generator.fullPackagePath",
                   defaultValue="${project.groupId}.${project.artifactId}")
        protected String fullPackagePath
        Nom du paquetage pour les fichiers générés (xmi input sepcific).
        Since:
        2.0.0
      • resolver

        @Parameter(property="generator.resolver",
                   defaultValue="org.nuiton.util.ResourceResolver")
        protected String resolver
        Nom du resolver a utiliser pour les transformations xmi vers model (xmi input sepcific).
        Since:
        2.0.0
      • templates

        @Parameter(property="eugene.templates")
        protected String templates
        Templates à utiliser, séparés par des virgules pour les transformations depuis les models (model input sepcific).
        Since:
        0.50
      • excludeTemplates

        @Parameter(property="eugene.excludeTemplates")
        protected String[] excludeTemplates
        Templates à ne pas utiliser lors de la transformations des models (model input sepcific).
        Since:
        0.63
      • defaultPackage

        @Parameter(property="eugene.defaultPackage",
                   defaultValue="${project.groupId}.${project.artifactId}")
        protected String defaultPackage
        Nom par défaut du paquetage généré (model input specific).
        Since:
        0.50
      • generatedPackages

        @Parameter(property="eugene.generatedPackages")
        protected String generatedPackages
        List of packages to generate (comma separated). (model input specific). If the parameter is not filled, will generate all packages.
        Since:
        1.0.0-rc-8
      • extractedPackages

        @Parameter(property="eugene.extractedPackages",
                   defaultValue="${project.groupId}.${project.artifactId}")
        protected String extractedPackages
        List of package to extract from xmi to models. (model input specific). If the parameter is not filled, will extract all packages.
        Since:
        1.0.0-rc-8
      • failIfUnsafe

        @Parameter(property="eugene.failIfUnsafe",
                   defaultValue="true")
        protected boolean failIfUnsafe
        A flag to fail if model properties is not safe (means some tagValues or stereotypes are not correct). Note: since version 3.0, the default value is true.
        Since:
        2.9
      • modelExtensionFile

        @Parameter(property="eugene.modelExtensionFile")
        protected File modelExtensionFile
        To use a new object model extension file.
        Since:
        3.0
      • project

        @Parameter(defaultValue="${project}",
                   readonly=true)
        protected org.apache.maven.project.MavenProject project
        Maven project.
        Since:
        2.0.0
      • settings

        @Parameter(defaultValue="${settings}",
                   readonly=true)
        protected org.apache.maven.settings.Settings settings
        Le settings (pour obtenir le mode offline).
        Since:
        2.0.0
      • fixedClassLoader

        protected ClassLoader fixedClassLoader
        fixed classloader
    • Constructor Detail

      • GenerateMojo

        public GenerateMojo()