In case of duplicate bundles, re-version the product bundle #244
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.
When two features are merged and both contain the exact same artifact (exact same mvn coordinates), then the resulting feature has that artifact only once - as it is the same.
With this patch, if the user feature and the product feature both contain the exact same bundle, this is checked after the features are merged and then the metadata is massaged:
For the bundle in the feature model, the artifact metadata from the user feature is used, basically changing the origin of that bundle to be from the user. In addition, the cached analyser metadata is removed as that one contains the "reporting" section which ignores all warnings/errors for this bundle. Removal of that metadata is not critical as this bundle is available to the build/run from the user feature anyway.
While this works for the pure analysing use cases, I am not 100% sure if the resulting feature can later on be used to actually start the instance as well as the origin of the bundle has changed and it is not in the internal region anymore.
This replaces #232
This fixes #231