LFET.Project.yaml

LFET.Project.yaml and Project.yaml are alternative names for the Project.ini file and allow the use of the lightweight markup language YAML instead of the traditional property format (key=value).

Sample entry in an LFET.Pro­ject.ini file:
BackupHistoryFolder = backups
BackupHistoryLength = 50
Sample entry in an LFET.Project.yaml file:
 LFET:

   BackupHistory:
     Folder: backups
     Length: 50
or:
 LFET:

   Backup:
     History:
       Folder: backups
       Length: 50

 

Hints on LFET.Project.yaml-files:

  • The "root element" in YAML-files must be called LFET or LFET.Pro­ject.ini

  • Key names are case-insensitive; likewise the use of dots to separate words

  • Only spaces may be used for indentation

Creating key names

The final key name is created internally by configuring all key names from the second level in each case separated with a dot.

YAML notation
 LFET:

   BackupHistory:
     Folder: backups

is changed internally to: BackupHistory.Folder = backups.

YAML notation
LFET:

  Backup:
    History:
       Folder: backups

is changed internally to: Backup.History.Folder = backups.

Separation of words with dots when recognizing keywords is without relevance for LF‑ET; INI-files and in particular also YAML files are thus very flexible and tolerant as regards the expressions and structures used.

Inverted commas

In the case of some generation parameters double inverted commas can be used on purpose, e.g. in order to suppress search for INI-files or the generation of a package entry:

LFET.Pro­ject.ini:

ide.Java = true
ide.Java.Package = ""

Since inverted commas as such are determined as values in YAML, double inverted commas must be placed in single inverted commas (or vice versa):

LFET:

  ide.Java:
    Enabled: true
      Package: '""'

TRUE/FALSE keys with further subkeys

In the case of true/false keys that are at the same time a prefix of other keys, the true or false value must be provided with the keyword Enabled: in YAML; see an example below:

LFET.Pro­ject.ini

ide.Java = true
ide.Java.SourceEncoding = UTF-8
ide.Java.SourcePath = ${project.root}/../../java/${package}

LFET.Project.yaml

LFET:

  ide.Java:
    Enabled: true
    Source:
      Encoding: UTF-8
      Path: ${project.root}/../../java/${package}

Enumerations

YAML enables the use of enumerations, as in the example below:

LFET:

  ide.Java:
    Enabled: true
    Interface:
      RulesClass:
        Annotation:
        - javax.annotation.processing.Generated("LF‑ET")
        - org.springframework.stereotype.Component,lombok.RequiredArgsConstructor

Multiline key values

Values can also span over several lines in YAML:

LFET:

  Keyname: |
  Key value first line
  Key value second line