-
-
Notifications
You must be signed in to change notification settings - Fork 305
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
[bndtools] Launch to bndrun #5829
Conversation
Signed-off-by: Fr Jeremy Krieg <[email protected]>
16316d8
to
0eeb677
Compare
Thanks a lot @kriegfrj . Could you maybe describe the usecase / purpose a bit more? Who would be the user of this feature and when would it be used? Is it meant as a helper during a migration to bndtools? That context might help with feedback. |
Sure, Use case is for someone who wants to convert a project from PDE to Bndtòols. Part of that process includes having to convert PDE launch files into bndrun equivalents, for launching the frameworks. This tool automates a large part of that step. |
Are the PRs can be checked as builded binaries (which can be installed and used in Eclipse) or do I have to test it from the source? |
The binaries are not publically available. There's two ways you could test it:
The first is probably easier. |
Btw, thanks for being brave enough to consider giving it a try, @peterkir ! |
Signed-off-by: Fr Jeremy Krieg <[email protected]>
0eeb677
to
ab19e48
Compare
@kriegfrj you're still planning to move this forward? |
Has anyone tried this out? |
No, sorry, since I don't have any PDE knowledge. But we might include @laeubi in the discussion. He was involved some bnd - PDE collaboration work and might be a good PDE person. |
Is this also related to running the OSGi container with extracted bundles in |
@kriegfrj I want to close this to inactivity. Feel free to reopen it when you want to work on it again. Hope one day you'll be back ... |
Missed the question of @kenwenzel ... Anybody can answer this? |
The referenced issue talks about Beside that, Equinox (not sure about Felix) already supports using "exploded bundles", so it is more how bnd handles it and how maven works, running tests directly from |
@laeubi If you execute I'm just looking for a bnd-based alternative for the The big advantage is, for example, that a web application could be started where HTML or JS files are modified and copied into |
As said, this is a workaround maven uses because you don't have the package phase run (what likely will change with maven 4)
As said, this is completely possible (and PDE/Tycho are working exactly that way usually), but in fact from a maven perspective the packaged jar is "the artifact" to use after the package phase (so after that you won't see I don't say its useful /doable (the easiest way for your usecase would be to put the maven output folder on the classpath of the bundles using a equinox specific dev-entry) but not related to the work of this PR... The main question for me would be: Why do you start a maven run at all and not launch it directly in the IDE (what uses references to jars and works already to hot-replace them AFAIK). |
We need a way to run the OSGi framework from multiple IDEs (Eclipse and IDEA). Hot code replacement is a feature of the debugger. If you run the application in debug mode and attach the IDE then the respective classes will be automatically replaced after compilation. This works no matter if the application runs from jar files or target/classes. |
Hot code replace != hot jar replace :-) Anyways, due how maven work this won't work in a traditional maven build as there is no one who rebuilds the jar (in contrast to an IDE that can rebuild it on code change) If you are using Equniox framework you can emulate "the PDE way" by specify a so called "dev classpath" with:
so in your case |
I defiantly can't speak for bnd or the future, I just can give some insight into the technical difficulties (from maven an/or OSGi), e.g. Tycho does add What might also work is using bnd-run and use jar references to start the application from the local maven repo, and then run a |
The short answer to your question is "no". 😄
This is true. In fact, I've found in some cases where the two seem to step on each other's toes... |
It's been a while, but from memory this works. I just wanted some other people to try it out before merging. However, after this sitting here for so long and no one really trying it out, I can see that this was a rather forlorn hope. 😄 So I'm going to propose another approach:
Hopefully, this way we might get some actual users and some real-world feedback, ideas and (hopefully) contributions. Thoughts? |
@kriegfrj still optimistic! I will merge it. |
Thanks for engaging! |
@pkriens @kriegfrj I just tried to update my Eclipse instance to latest Snapshot (as I have done a lot in the recent weeks, because I am always on the latest snapshot). After this PR got merged I get this error:
What I did:
then and then Then it takes longer than usual and then the error appears |
--- Signed-off-by: Peter Kriens <[email protected]> Signed-off-by: Peter Kriens <[email protected]>
Missing package in resolve for the #5829 PR
@peterkir , as you seemed to express an interest in trying this feature but didn't want to have to test it from the source... This feature is now available in the Snapshot build of Bndtools. So if you're still keen to try it out, you can install the snapshot build of Bndtools and give it a try now. |
This PR is a proof-of-concept. It will take a PDE
.launch
file and convert it into a.bndrun
. The final.bndrun
might still need some manual tweaking. It also assumes that you've done the work to convert the PDE target platform definition into Bnd respositories in your workspace.There are two parts:
biz.aQute.bnd.pde
, which contains the actual utility that does the conversion;xxx.launch
file, you will have a menu item "Generate bndrun...". If you select it, it will create a correspondingxxx.bndrun
file using thebiz.aQute.bnd.pde
library.I am interested in feedback of all types. Is this a useful addition? Is the name appropriate? Is it in the right package? Should it be in its own bundle or rolled into another?