Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In case of duplicate bundles, re-version the product bundle #244

Merged
merged 4 commits into from
Jul 26, 2024

Conversation

cziegeler
Copy link
Contributor

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

Copy link
Contributor

@niekraaijmakers niekraaijmakers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but testing this will be tricky and needed at the same time.

@cziegeler
Copy link
Contributor Author

We could put it behind a flag, and for now only set it for the maven plugin.
For the other use case, we can then test by enabling the flag

@cziegeler cziegeler merged commit d2df2a9 into main Jul 26, 2024
3 checks passed
@cziegeler cziegeler deleted the issue-231-2 branch July 26, 2024 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Package Import / Export analyser does not fail if an internal bundle is included and accesses internal API
2 participants