bnd
bnd copied to clipboard
[Maven] Inconsisitent behavior for bndrun between Eclipse Bndtools integration and console
Example Project: https://github.com/geckoprojects-org/org.gecko.playground/tree/bndissue/maven Branch: bndissue
When I just want to resolve a bndrun using the IDE by pressing the resolve button, I always need the resolve execution in maven.
When I want to start/run bndrun I also need a run execution.
If I have a bndrun that inherits from a parent one, that has already been resolved, from withtin the IDE I also need a resolve execution for that concrete one.
My expectation was to just resolve, what needs to be resolved. This would also belong to the configuration. So like in the provided example, my pom.xml is expected to look like this:
org/org.gecko.playground/blob/bndissue/maven/org.gecko.playground.maven.ds.simple/pom.xml
But this only works in the console, but not in the IDE integration, when I press run: https://github.com/geckoprojects-org/org.gecko.playground/blob/bndissue/maven/org.gecko.playground.maven.ds.simple/pom.xml
I end up with that:
If you remove the comment in line 33, the application runs fine in the console as well as in the IDE Integration.
Shouldn't this behavior be consistent in the IDE and from Maven CMD. Obviously the expected behavior works in the commmand line. So it seems there is a different configuration expected when using the IDE integration.
Source of the issue: https://github.com/bndtools/bnd/blob/5b0da633954f66cc588680e9db10cd7a5211f1a2/bndtools.m2e/src/bndtools/m2e/MavenRunProvider.java#L125
The same problem occurs, when Exporting from the IDE
After thinking about this issue, my conclusion is. It is the best to provide a meaningful error message, e.g. when lauching the bndrun:
I have a solution, but it conflicts a little bit with the changes of PR #6034