You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to suggest the following:
Lets assume CobiGen performs a generation on the input X. Currently CobiGen only resolves variables based on the global trigger. However, sometimes X does not contain the input required to resolve all variables. A simple example is access-control-schema.xml that does not contain the application name (neither in path nor in context). So my proposal is:
CobiGen does a recursive path traversal on dirname(X) and in each directory up to the filesystem root it collects files named cobigen.properties.
CobiGen then creates new Properties() and loads all collected cobigen.properties from the root to the leaf.
These properties are added to the properties produced by the trigger.
Now if I have a project I can simply create a cobigen.properties file with this content and check into version control:
With the flexible approach described above I could even override individual properties on package-basis, etc. With this we could solve a lot of problems we are currently facing.
The text was updated successfully, but these errors were encountered:
If I got you right, this property files should be located in the templates folder structure?
This approach a way more flexible than the current context.xml approach.
Nevertheless, the access-control-schema trigger exacly defines a constant as a fixed property for generation, which can be adapted by your project.
We should also take into consideration, thhat it should be easy to maintain the proeprties for a project. Distributing all the properties over a large number of folders and sub-folders, might end up in a configuration hell. Thus, the default should be one properties file in the root.
I will take this into consideration, when designing the templates folder in a more pattern like way in the near future.
Nevertheless, the access-control-schema trigger exacly defines a constant as a fixed property for generation, which can be adapted by your project.
My project is following microservices architecture. I have many apps (MS) and thus have many access-control-schema.xml but only one template set with one fixed property.
If I got you right, this property files should be located in the templates folder structure?
I was thinking about the folders of the project where to content is generated to, but both approaches have its pros and cons. Maybe you could support both (at least top-level folder of the project should allow to have a config file that is honoured.
I would like to suggest the following:
Lets assume CobiGen performs a generation on the input
X
. Currently CobiGen only resolves variables based on the global trigger. However, sometimesX
does not contain the input required to resolve all variables. A simple example isaccess-control-schema.xml
that does not contain the application name (neither in path nor in context). So my proposal is:dirname(X)
and in each directory up to the filesystem root it collects files namedcobigen.properties
.new Properties()
and loads all collectedcobigen.properties
from the root to the leaf.Now if I have a project I can simply create a
cobigen.properties
file with this content and check into version control:With the flexible approach described above I could even override individual properties on package-basis, etc. With this we could solve a lot of problems we are currently facing.
The text was updated successfully, but these errors were encountered: