Why make donate
google analytics

eugene:smart-generate

Nom complet :

org.nuiton.eugene:maven-eugene-plugin:2.4.2:smart-generate

Description :

Smart file generator.

Fill inputs and mojo will chained needed writer.

User: chemit Date: 24 nov. 2009 Time: 00:22:37

Attributs :

  • Exige un projet Maven 2.0 pour être exécuté.
  • Exige une résolution de dépendances des artefacts dans le scope : compile.

Paramètres requis

Nom Type Depuis Description
extractDirectory File 2.1.3 Where to copy extracted files (when using class-path data).
Valeur par défaut est : target/extracted-sources.
inputs String[] 2.0.0 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>

modelType String 2.0.0 The type of model to be used.

By default, use an objectmodel.
Valeur par défaut est : objectmodel.
outputDirectory File 2.0.0 Where to generate files.
Valeur par défaut est : target/generated-sources.

Paramètres optionnels

Nom Type Depuis Description
defaultPackage String 0.50 Nom par défaut du paquetage généré (model input specific).
Valeur par défaut est : ${project.groupId}.${project.artifactId}.
dryRun boolean 2.0.0 Ne génère rien, analyse juste la configuration.
Valeur par défaut est : false.
encoding String 2.0.0 Encoding to be used for generation of files.

Note: If nothing is filled here, we will use the system property file.encoding.
Valeur par défaut est : ${project.build.sourceEncoding}.
excludeTemplates String[] 0.63 Templates à ne pas utiliser lors de la transformations des models (model input sepcific).
extractedPackages String 1.0.0-rc-8 List of package to extract from xmi to models. (model input specific).

If the parameter is not filled, will extract all packages.
Valeur par défaut est : ${project.groupId}.${project.artifactId}.
fullPackagePath String 2.0.0 Nom du paquetage pour les fichiers générés (xmi input sepcific).
Valeur par défaut est : ${project.groupId}.${project.artifactId}.
generatedPackages String 1.0.0-rc-8 List of packages to generate (comma separated). (model input specific).

If the parameter is not filled, will generate all packages.
overwrite boolean 2.0.0 Ecrase les fichiers générés.
Valeur par défaut est : false.
properties Map 2.0.0 Properties to pass to writer.
resolver String 2.0.0 Nom du resolver a utiliser pour les transformations xmi vers model (xmi input sepcific).
Valeur par défaut est : org.nuiton.util.ResourceResolver.
skipInputs String 2.0.0 List of input (protocol) not to treate separated by comma.

Example :
<skipInputs>xmi</skipInputs>
<skipInputs>xmi,model</skipInputs>

templates String 0.50 Templates à utiliser, séparés par des virgules pour les transformations depuis les models (model input sepcific).
testPhase boolean 2.0.0 A flag to mark the mojo to be used in a test phase. This will permits to add generated sources in test compile roots.
Valeur par défaut est : false.
verbose boolean 2.0.0 Pour activer le mode verbeux.
Valeur par défaut est : ${maven.verbose}.

Détails des paramètres

defaultPackage :

Nom par défaut du paquetage généré (model input specific).
  • Type : java.lang.String
  • Depuis : 0.50
  • Exigé : Non
  • Expression : ${eugene.defaultPackage}
  • Défaut : ${project.groupId}.${project.artifactId}

dryRun :

Ne génère rien, analyse juste la configuration.
  • Type : boolean
  • Depuis : 2.0.0
  • Exigé : Non
  • Expression : ${eugene.dryRun}
  • Défaut : false

encoding :

Encoding to be used for generation of files.

Note: If nothing is filled here, we will use the system property file.encoding.
  • Type : java.lang.String
  • Depuis : 2.0.0
  • Exigé : Non
  • Expression : ${eugene.encoding}
  • Défaut : ${project.build.sourceEncoding}

excludeTemplates :

Templates à ne pas utiliser lors de la transformations des models (model input sepcific).
  • Type : java.lang.String[]
  • Depuis : 0.63
  • Exigé : Non
  • Expression : ${eugene.excludeTemplates}

extractDirectory :

Where to copy extracted files (when using class-path data).
  • Type : java.io.File
  • Depuis : 2.1.3
  • Exigé : Oui
  • Expression : ${eugene.extractDirectory}
  • Défaut : target/extracted-sources

extractedPackages :

List of package to extract from xmi to models. (model input specific).

If the parameter is not filled, will extract all packages.
  • Type : java.lang.String
  • Depuis : 1.0.0-rc-8
  • Exigé : Non
  • Expression : ${eugene.extractedPackages}
  • Défaut : ${project.groupId}.${project.artifactId}

fullPackagePath :

Nom du paquetage pour les fichiers générés (xmi input sepcific).
  • Type : java.lang.String
  • Depuis : 2.0.0
  • Exigé : Non
  • Expression : ${generator.fullPackagePath}
  • Défaut : ${project.groupId}.${project.artifactId}

generatedPackages :

List of packages to generate (comma separated). (model input specific).

If the parameter is not filled, will generate all packages.
  • Type : java.lang.String
  • Depuis : 1.0.0-rc-8
  • Exigé : Non
  • Expression : ${eugene.generatedPackages}

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>
  • Type : java.lang.String[]
  • Depuis : 2.0.0
  • Exigé : Oui
  • Expression : ${eugene.inputs}

modelType :

The type of model to be used.

By default, use an objectmodel.
  • Type : java.lang.String
  • Depuis : 2.0.0
  • Exigé : Oui
  • Expression : ${eugene.modelType}
  • Défaut : objectmodel

outputDirectory :

Where to generate files.
  • Type : java.io.File
  • Depuis : 2.0.0
  • Exigé : Oui
  • Expression : ${eugene.outputDirectory}
  • Défaut : target/generated-sources

overwrite :

Ecrase les fichiers générés.
  • Type : boolean
  • Depuis : 2.0.0
  • Exigé : Non
  • Expression : ${eugene.overwrite}
  • Défaut : false

properties :

Properties to pass to writer.
  • Type : java.util.Map
  • Depuis : 2.0.0
  • Exigé : Non

resolver :

Nom du resolver a utiliser pour les transformations xmi vers model (xmi input sepcific).
  • Type : java.lang.String
  • Depuis : 2.0.0
  • Exigé : Non
  • Expression : ${generator.resolver}
  • Défaut : org.nuiton.util.ResourceResolver

skipInputs :

List of input (protocol) not to treate separated by comma.

Example :
<skipInputs>xmi</skipInputs>
<skipInputs>xmi,model</skipInputs>
  • Type : java.lang.String
  • Depuis : 2.0.0
  • Exigé : Non
  • Expression : ${eugene.skipInputs}

templates :

Templates à utiliser, séparés par des virgules pour les transformations depuis les models (model input sepcific).
  • Type : java.lang.String
  • Depuis : 0.50
  • Exigé : Non
  • Expression : ${eugene.templates}

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.
  • Type : boolean
  • Depuis : 2.0.0
  • Exigé : Non
  • Expression : ${eugene.testPhase}
  • Défaut : false

verbose :

Pour activer le mode verbeux.
  • Type : boolean
  • Depuis : 2.0.0
  • Exigé : Non
  • Expression : ${eugene.verbose}
  • Défaut : ${maven.verbose}
Maven JRst ReStructuredText