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

Extend demo bnd-workspace for creation of executable jar via .bndrun #4675

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

chrisrueger
Copy link
Contributor

@chrisrueger chrisrueger commented Feb 1, 2025

  • added a .bndrun in the demo.impl bundle which is used to build the executable jar (comparable to building the product)
  • added another consumer bundle which
  • installed Felix Gogo Shell, so that you can even start the application and type 'hello' in the console to get an output from the service. this is basically now a very simple OSGi application
  • changed to Java17
  • removed all warnings in Eclipse
mvn clean verify -Dtycho-version=5.0.0-SNAPSHOT

[INFO] bnd-parent ......................................... SUCCESS [  0.038 s]
[INFO] tycho.demo.api ..................................... SUCCESS [  1.409 s]
[INFO] tycho.demo.consumer ................................ SUCCESS [  1.127 s]
[INFO] tycho.demo.markdown ................................ SUCCESS [  1.469 s]
[INFO] tycho.demo.impl .................................... SUCCESS [  1.219 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------

In Eclipse you can start the .bndrun and also Export it as an executable jar like this:

image

The .bndrun can also be created and run for test and comparison purposes via the bnd command line:

cd demo/bnd-workspace
bnd export tycho.demo.impl/tycho.demo.app.bndrun

or just run it as a application:

bnd run tycho.demo.impl/tycho.demo.app.bndrun
which starts the app and shows the Felix Gogo Shell.

____________________________
Welcome to Apache Felix Gogo

g! Please type 'hello' into the console and press Enter, and magic will happen.

Then type 'hello'.

hello
Hello BND Workspace!
Render some markdown to HTML: <h2>H2 Headline</h2>

@chrisrueger chrisrueger force-pushed the add-bndrun-to-demo-bndworkspace branch from ddf14cf to 8c74a50 Compare February 1, 2025 19:48
- added a .bndrun in the demo.impl bundle which is used to build the executable jar (comparable to building the product)
- added another consumer bundle which
- installed Felix Gogo Shell, so that you can even start the application and type 'hello' in the console to get an output from the service. this is basically now a very simple OSGi application
- changed to Java17
- removed all warnings in Eclipse

tweak target-dir with ${driver}
this allows to use different build tools independently
@chrisrueger chrisrueger force-pushed the add-bndrun-to-demo-bndworkspace branch from 8c74a50 to 0ccd052 Compare February 1, 2025 19:58
Copy link

github-actions bot commented Feb 1, 2025

Test Results

  606 files  ±0    606 suites  ±0   4h 0m 52s ⏱️ + 5m 42s
  434 tests ±0    426 ✅  - 1   7 💤 ±0  1 ❌ +1 
1 302 runs  ±0  1 279 ✅  - 1  22 💤 ±0  1 ❌ +1 

For more details on these failures, see this check.

Results for commit 0ccd052. ± Comparison against base commit 9330061.

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.

1 participant