init MavenImplicitProjectRepository again to fix resolving M2E Maven projects in non-bnd-workspaces#6396
Closed
chrisrueger wants to merge 1 commit intobndtools:masterfrom
Closed
init MavenImplicitProjectRepository again to fix resolving M2E Maven projects in non-bnd-workspaces#6396chrisrueger wants to merge 1 commit intobndtools:masterfrom
chrisrueger wants to merge 1 commit intobndtools:masterfrom
Conversation
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 <chrisrueger@gmail.com>
This was referenced Dec 8, 2024
Member
|
I think this is superseded by #6401 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #6393
in 7.0.0
LaunchUtils.createRun()was called which is responsible for creating an instance ofMavenImplicitProjectRepositorywhich is required for resolving bndrun in an m2e project. but it was removed in 7.1.0 for some reason. So in 7.1.0MavenImplicitProjectRepositorywas 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.
@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 ofBndrun.createBndrun(workspace, this.inputFile);) and then resolving worked again (as per expected behavior in #63937.0.0.:
bnd/bndtools.core/src/bndtools/editor/BndEditor.java
Line 617 in b82dc86
7.1.0:
bnd/bndtools.core/src/bndtools/editor/BndEditor.java
Line 622 in f9b2c85