IBM / dbb-zappbuild

zAppBuild is a generic build solution for building z/OS applications using Apache Groovy build scripts and IBM Dependency Based Build (DBB) APIs.
Apache License 2.0
40 stars 123 forks source link

Use filters and folder names in the languageConfigurationMapping.properties #497

Closed wfezzani closed 1 month ago

wfezzani commented 3 months ago

Extend the FilePropUtilities.groovy script to handle the use of folder names and filters/wildcards in languageConfigurationMapping.properties. This way, the user will be able to easier map a group of programs with a common language configuration property file, and avoid to enter all the program names and map each one with the corresponding property file.

Thanks you!

dennis-behm commented 3 months ago

@wfezzani

I would prefer to even take this further than what you are proposing:

Quick recap of current implementation

In todays implementation for the language configurations, each member needs to be added to the languageConfigurationMapping.properties file to map it to the language configuration. The original purpose was to generate these mappings from existing mappings of the old build framework.

With your suggestions, here is what came to my mind :

We can extend zAppBuild capability and allow an alternative way of the mapping definition for the language configurations using the standard DBB file properties capability, for instance if the user has clear ways of grouping them. So, instead of inspecting the languageConfigurationMapping.properties file and require a mapping for each member, we allow something like:

# map all files with epsc*, epsd* and  to language configuration languageConfigProps01
languageConfiguration = languageConfigProps01 :: **/epsc*.cbl, **/epsd*.cbl

# map all epcm* to language configuration languageConfigProps02
languageConfiguration = languageConfigProps02 :: **/epcm*.cbl

Also related to discussion #478 . Thoughts @mhardin18 ?

Implementation has to be done here: https://github.com/IBM/dbb-zappbuild/blob/9f2561711cb4adae85376b8513d69b4220f4a9f0/utilities/FilePropUtilities.groovy#L25-L30

dennis-behm commented 1 month ago

Delivered via zAppBuild 3.8.0