Fix resources exclusion in a multi-module project with git repo #257
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.
What's changed?
Fixed the bug with resources in subproject being excluded from processing.
What's your motivation?
I have a multi-module project like this:
And I have a custom recipe to modify some YAML. While the
application-root.yml
is correctly modified, theapplication-subproject.yml
is skipped. It is reproduced in theresources in subproject committed to git are correctly processed
test case.There is already a test case
rewriteRun applies recipe to a multi-project build
which aims to verify this situation, but it doesn't check the case when Git repo is available. There is a different code path inOmniParser
for such case and it's not reached.I believe that I've found a bug in the code of
DefaultProjectParser
. When theOmniParser
is created for the root project, it is configured to exclude contents of its subprojects. But when it's created for the subproject, it's still configured to exclude the root project's subprojects, so also the subproject we want to parse.Anything in particular you'd like reviewers to focus on?
I've added the
Project
parameter to theomniParser()
. Please verify that the updated method usages are correct.Additional changes
There was a typo in
dependencyRepositoriesDeclaredInSettings
test case which caused the test to fail. I fixed it:nevVersion
->newVersion
Checklist