In addition to the default property files read while processing a plugin, genapp uses on top a template specific property file. This will be read after the plugin has found the template specified by the user. Since all the property files share the same namespace you can define any of the properties below anywhere. But typically you will have properties specific for each template.
Property | Description | Default |
---|---|---|
maven.genapp.filter | Specifies the files (comma-separated list) that have to be copied into the new project after they have been filtered. The filtering replaces placeholders with properties (see below). | project.xml,**/index.xml,**/navigation.xml |
maven.genapp.param | Specifies the filter parameters (comma-separated list). See filtering rules below and a descitpion of the default parameters. | id,name,package,user |
maven.genapp.repackage | Specifies the directories (comma-separated list) with files to build a Java package. Genapp will copy the files into the new project according the path rules for packages. The package is defined with the property maven.genapp.template.package. The files are not only copied, but also filtered. | main/java,test/java |
maven.genapp.template | Specifies the template to use when generating the application. If this property is not defined, the user will be prompted with the default value from property maven.genapp.default.template. | default |
maven.genapp.template.dir | Specifies the template directory to use when generating the application. Usually set based on the maven.template.repository and maven.genapp.template chosen. Users can override this property in order to use a custom template directory. meven.template.repository and maven.genapp.template will then go unused. This can be useful for other plugins. | n/a |
maven.genapp.template.repository | Specifies a directory that has additional templates. If this property is not defined, the template will be searched in the local Maven directory or in the resources of the plugin itself. | ${maven.home.local}/template |
maven.genapp.basedir | Directory where the new project will be generated. If this property is not defined, the user will be prompted. | ${basedir} (when prompted) |
maven.genapp.repackage.dir |
Base directory for the maven.genapp.repackage property.
|
src
|
Generating a project from a template a lot of parameters can be useful for the template depending on the organisation using them. Genapp has some predefined parameters described in the table below. Each parameter makes usage of some properties following a naming scheme and can be declared interactive i.e. the user generating an application from a template will be asked for the parameter's value. The property maven.genapp.param declares all available parameters for the filtering. During the project generation the filter uses the properties that follow the naming scheme maven.genapp.template.<param>. It is always possible to overwrite these values. The default value is always defined by a property named maven.genapp.default.<param>. If the value should be enetered interactive, you can define the prompt with a property maven.genapp.prompt.<param>. The filter itself is used copying the files defined by maven.genapp.repackage and maven.genapp.filter and will replace any occurrence of @<PARAM>@ in the files with the value of maven.genapp.template.<param>.
Property | Description | Default | Prompted |
---|---|---|---|
maven.genapp.template.id | Specifies the id of the application to be generated If this property is not defined, the user will be prompted. | app | Yes |
maven.genapp.template.name | Specifies the name of the application to be generated If this property is not defined, the user will be prompted. | Example Application | Yes |
maven.genapp.template.package | Specifies the name of the Java package that code will be generated for. If this property is not defined, the user will be prompted. | example.app | Yes |
maven.genapp.template.user | Specifies the user's account name. | ${user.name} | No |