Skip to content

Consider a different version output if no properties are set #363

Closed
@ullenboom

Description

@ullenboom

By default, the version command is active. However, without any properties set, the output might
surprise:

version
2022-02-04 19:48:59.496 ERROR 179596 --- [           main] .TemplateExecutor$LoggingSTErrorListener : runTimeError [context [anonymous] 1:4 attribute buildVersion isn't defined]
2022-02-04 19:48:59.497 ERROR 179596 --- [           main] .TemplateExecutor$LoggingSTErrorListener : runTimeError [context [anonymous] 4:4 attribute buildGroup isn't defined]
2022-02-04 19:48:59.497 ERROR 179596 --- [           main] .TemplateExecutor$LoggingSTErrorListener : runTimeError [context [anonymous] 7:4 attribute buildArtifact isn't defined]
2022-02-04 19:48:59.497 ERROR 179596 --- [           main] .TemplateExecutor$LoggingSTErrorListener : runTimeError [context [anonymous] 10:4 attribute buildName isn't defined]
2022-02-04 19:48:59.497 ERROR 179596 --- [           main] .TemplateExecutor$LoggingSTErrorListener : runTimeError [context [anonymous] 13:4 attribute buildTime isn't defined]
2022-02-04 19:48:59.497 ERROR 179596 --- [           main] .TemplateExecutor$LoggingSTErrorListener : runTimeError [context [anonymous] 16:4 attribute gitShortCommitId isn't defined]
2022-02-04 19:48:59.497 ERROR 179596 --- [           main] .TemplateExecutor$LoggingSTErrorListener : runTimeError [context [anonymous] 19:4 attribute gitCommitId isn't defined]
2022-02-04 19:48:59.497 ERROR 179596 --- [           main] .TemplateExecutor$LoggingSTErrorListener : runTimeError [context [anonymous] 22:4 attribute gitBranch isn't defined]
2022-02-04 19:48:59.497 ERROR 179596 --- [           main] .TemplateExecutor$LoggingSTErrorListener : runTimeError [context [anonymous] 25:4 attribute gitCommitTime isn't 

I am not sure if ERROR is the appropriate log level. Maybe change to WARNING or find a more compact way to express that no data exists for a version string. Or maybe don't activate the version command if the properties are not set.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions