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.
I had to extract the part which does variable resolution from TargetDefinitionResolver into the .shared bundle
so it is available both in TargetDefinitionResolver but also in Mojos which deal with repository location.
Also had to make some public access to TargetDefinition.Repository implementation in TargetDefinitionFile.
This is very ugly, I feel the problem here is the Repository in TargetDefinition and TargetDefinitionFile
should in fact not be the same class as one represents the repository element as present in .target file
(potentially with unresolved variables) and the other is resolved repository with valid URI.
Changing this would be a bigger refactoring I felt would be too invasive to do here.
I did not find any test for update-target and am not sure how to write one (since it updates files in place)
but at least tested that one manually and seems to work fine.
The other affected plugin, target validation Mojo, is tested in IT along with testing the locations resolve correctly.