Telosys doc
WebsiteTwitterLinkedInNews
  • Telosys documentation
  • Telosys CLI
    • Installation on Linux
    • Installation on Windows
    • CLI configuration
    • CLI commands
    • Getting started
  • Telosys with VSCode
    • Extension installation
    • VSCode settings
    • Telosys terminal in VSCode
    • Telosys editor configuration
  • Telosys with JetBrains IDE
  • Project configuration
  • Project variables
  • Project databases
  • Models and entities
    • Model structure
    • Entity
    • Attribute / Link
    • Annotations
    • Tags
    • Examples
    • Model creation
    • Model installation
    • Models management
  • Bundles of templates
    • Bundle structure
    • Bundle creation
    • Bundles installation
    • Bundles management
    • Velocity language
    • Velocity directives
    • Velocity object types
    • Telosys directives
    • Telosys variables
    • Telosys objects
    • Code snippets
  • Code generation
    • "gen" command
    • "genb" command
  • Target languages
    • C++
    • C#
    • Golang
    • Java
    • JavaScript
    • Kotlin
    • PHP
    • Python
    • Scala
    • TypeScript
  • Target databases (SQL)
    • Predefined rules
    • Specific rules
    • Type size and precision
  • Telosys with Git
    • GitHub usage
    • Install with Git
    • Publish with Git
  • Support the project
  • How to contribute
  • Sponsors
  • IDE and editors
  • Telosys 3 Eclipse plugin
    • Eclipse plugin installation
    • Eclipse customization
    • Telosys 3 database model
Powered by GitBook
On this page
  • Standard variables
  • Specific variables

Project variables

Each Telosys project has a set of variables available at "project level".

This is the highest level of variable definition. These variables are usable everywhere in the current project : in templates files (".vm") and in bundle configuration file ("templates.cfg").

Project variables are defined in the file "TelosysTools/telosys-tools.cfg".

Each line has the following syntax :

VARIABLE_NAME = value

Each line starting with "#" is a comment :

# this is a comment

By convention, the variables defined at project level are always in upper case.

Standard variables

A "standard variable" is a variable that is supposed to always be defined (for all types of projects).

Examples :

# -------------------------------------------
# STANDARD VARIABLES 
# -------------------------------------------
# --- Folders 
SRC      = src/main/java
RES      = src/main/resources
WEB      = src/main/webapp
TEST_SRC = src/test/java
TEST_RES = src/test/resources
DOC      = doc
TMP      = tmp
# --- Packages
ROOT_PKG = org.foo.bar

Specific variables

A "project-specific variable" is a variable defined for the specific needs of a project.

For example, a project variable can be defined in a project to generate PHP code and not defined in another project which aims to generate Python code.

Note : a specific variable cannot override a standard variable.

Examples :

# -------------------------------------------
# SPECIFIC VARIABLES 
# -------------------------------------------
# Project configuration :
ProjectVariable.PROJECT_NAME    = cool-project
ProjectVariable.MAIN_ENTITY     = Employee
ProjectVariable.PROJECT_VERSION = 1.0.0-SNAPSHOT
ProjectVariable.MAVEN_GROUP_ID  = com.foo.bar

# Modules directories :
ProjectVariable.MICROSERVICE_DIR  = employee-ms
ProjectVariable.APPLICATION_DIR   = application
ProjectVariable.COMMONS_DIR       = commons
PreviousProject configurationNextProject databases

Last updated 6 months ago