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

init MavenImplicitProjectRepository again to fix resolving M2E Maven projects in non-bnd-workspaces #6396

Closed
wants to merge 1 commit into from

Conversation

chrisrueger
Copy link
Contributor

@chrisrueger chrisrueger commented Dec 8, 2024

Fixes #6393
in 7.0.0 LaunchUtils.createRun() was called which is responsible for creating an instance of MavenImplicitProjectRepository which is required for resolving bndrun in an m2e project. but it was removed in 7.1.0 for some reason. So in 7.1.0 MavenImplicitProjectRepository was never initialized, which seems to be the reason that the Maven Repositories which are show in the Repository Browser are not seen by the BndRunResolveContext.

With this PR resolving the reproducer from #6393 works again.

image

@pkriens I am not 100% what other effects this change might have. I just noticed the difference between 7.1.0 and 7.0.0.
and try to bring back the code from 7.0.0. Please have a look if this makes sense, or if some other logic is required.
In my test it went into the if-branch which calls LaunchUtils.createRun(inputResource, RunMode.EDIT); (instead of Bndrun.createBndrun(workspace, this.inputFile);) and then resolving worked again (as per expected behavior in #6393

7.0.0.:

if (inputResource != null) {

7.1.0:

Bndrun bndrun = Bndrun.createBndrun(workspace, inputFile);

in 7.0.0 LaunchUtils.createRun() was called which is responsible for creating an instance of MavenImplicitProjectRepository which is required for resolving bndrun in an m2e project. but it was removed in 7.1.0 for some reason.

Signed-off-by: Christoph Rueger <[email protected]>
@chrisrueger chrisrueger changed the title init MavenImplicitProjectRepository again init MavenImplicitProjectRepository again to fix resolving M2E Maven projects in non-bnd-workspaces Dec 8, 2024
@pkriens
Copy link
Member

pkriens commented Dec 13, 2024

I think this is superseded by #6401

@pkriens pkriens closed this Dec 13, 2024
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.

Cannot resolve bundle from bndrun file in M2E project: Cannot find framework
2 participants