Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wfezzani opened this issue Mar 26, 2024 · 2 comments · Fixed by #499
Closed

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

wfezzani opened this issue Mar 26, 2024 · 2 comments · Fixed by #499

Comments

@wfezzani
Copy link

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.

  • Example of the current languageConfigurationMapping.properties structure:
    epscmort.cbl=languageConfigProps01
    epscsmrd.cbl=languageConfigProps01
    epsnbrvl.cbl=languageConfigProps01

  • Example of the desired languageConfigurationMapping.properties structure:
    epscmort.cbl=languageConfigProps01
    folder-name=languageConfigProps01
    eps*.cbl=languageConfigProps01
    $ps*.*= languageConfigProps01

Thanks you!

@dennis-behm
Copy link
Member

@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:

// check for language configuration group level overwrite
loadLanguageConfigurationProperties = props.getFileProperty('loadLanguageConfigurationProperties', buildFile)
if (loadLanguageConfigurationProperties && loadLanguageConfigurationProperties.toBoolean()) {
String languageConfigurationPropertyFileName = props."$member"
if (languageConfigurationPropertyFileName != null) {

@dennis-behm
Copy link
Member

Delivered via zAppBuild 3.8.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants