Refactored JSON model generator build script #12267
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Within the "config-model-generator" project, the current Makefile "clean" target deletes the model JSON files and the calls the
build-config-models.shscript by passing the "clean" arg.The
build-config-models.shitself still deletes the model JSON file but when it gets the "build" arg instead.So it seems that in both cases "clean" or "build" arg, what we do is removing the JSON model files.
This PR cleans a little bit the logic.
The removal of the JSON model file is put at the top of the
build-config-models.shso that it's always done.At the same time, calling the
build-config-models.shis removed from the Makefile "clean" target because we can just rely on the exec-maven-plugin usage within the config-model-generator pom file.When using maven "compile" or "clean", the
build-config-models.shis called with right arg ("build" and "clean").So with the Makefile "clean" target just referring to the "java_clean" target, we end calling "mvn clean" which still leverages the exec-maven-plugin and calls the
build-config-models.shwith "clean" arg.In general the calling of the
build-config-models.shscript is driven through the exec-maven-plugin and the deletion of JSNO model files is something we always want with every run (with both "clean" or "build" args).All the above is, of course, valid when we use
make cleanandmake buildwhich anyway ends to use "mvn" the way described above.