IBM / dbb

The helpful and handy location for finding and sharing example IBM Dependency Based Build (DBB) scripts and snippets.
Apache License 2.0
55 stars 130 forks source link

SCLM to Groovy Migration - zImport does not support same language being used for different types #51

Open drbruce-git opened 4 years ago

drbruce-git commented 4 years ago

I have 2 different types, HPP and JCL that both use a language of TEXT. If I use an import type of LANG the wrong language is appended to these files with all the files getting .jcl.

I think the problem exists in both GenerateBuildProperties.groovy and GenerateZImport.groovy

The scriptMappings look OK however:

scriptMapping = TEXT :: hpp/text/.h scriptMapping = CPP :: cpp/cpp/.c scriptMapping = COPYBOOK :: dclgenc/copybook/.cpy scriptMapping = TEXT :: jcl/text/.jcl

Causes build to fail with: Caught: com.ibm.dbb.build.BuildException: java.io.FileNotFoundException: /u/dohertl/sclmMigration/jazz00/repo/jazz00/hpp/text/incl1.txt com.ibm.dbb.build.BuildException: java.io.FileNotFoundException: /u/dohertl/sclmMigration/jazz00/repo/jazz00/hpp/text/incl1.txt

There seems to be a lot of mismatch here. In langexts.txt I told it to use .h as the extension, however it imports the file in as INCL1.jcl and then tries to reference it with incl1.txt?

Workaround is to leave the HPP files as .txt or create separate language definitions.

drbruce-git commented 4 years ago

In GenerateZImport.groovy I have determined that the design used states this:

If an import type of LANG is used then all files of the same language get the same extension
If an import type of TYPE is used then all files of the same type get the same extension.

I will need to see what GenerateBuildProperties.groovy is doing.