renatoathaydes / osgi-run

Osgi-Run - A Gradle plugin to make the development of modular applications using OSGi completely painless
Apache License 2.0
54 stars 13 forks source link

default console configuration for Equinox #38

Closed paulvi closed 7 years ago

paulvi commented 8 years ago

Just by chance ran into http://stackoverflow.com/questions/25733843/how-to-start-osgi-console, that gave me answer why possible I could not run one of my first examples against Equinox

The solution is pasted below. Can this be default e.g. for #37 run-any

Make a run folder that would look like:

  • somedir/
  • configuration/
  • config.ini
  • org.eclipse.osgi.jar
  • org.eclipse.equinox.console.jar
  • org.apache.felix.gogo.shell.jar
  • org.apache.felix.gogo.command.jar
  • org.apache.felix.gogo.runtime.jar

Then edit config.ini as:

osgi.bundles=org.apache.felix.gogo.runtime@start, org.apache.felix.gogo.command@start, org.apache.felix.gogo.shell@start, org.eclipse.equinox.console@start

After done this, run java -jar org.eclipse.osgi.jar -console in your command line and the osgi console will start.

renatoathaydes commented 8 years ago

Equinox deprecated the -console option from version 3.8, so now we need to add a bunch more bundles to the default OSGi environment for the Equinox console to work?

Do I understand correctly?

Notice that the config.ini is already built correctly to start all bundles, so that doesn't need any change.

paulvi commented 8 years ago

It reads so, I need to try

However 3.8+ is not in maven central http://mvnrepository.com/artifact/org.eclipse.osgi/org.eclipse.osgi

paulvi commented 8 years ago

asked http://stackoverflow.com/questions/36542524/run-latest-equinox-with-gradle-maven-tool

renatoathaydes commented 8 years ago

I've found a newer version of Equinox in Maven Central... you can use this to run with Java 8:

osgiMain = 'org.eclipse:osgi:3.10.0-v20140606-1445'

But I could not find a console. Equinox artifacts in Maven Central are a mess...

renatoathaydes commented 8 years ago

If you really need it, you can download the jars from the Equinox downloads page and use it as a flatJar dependency with Gradle (obviously, not portable)... but I don't see any public Maven repository that I can use to fetch the console jar with Gradle, unfortunately.

renatoathaydes commented 7 years ago

osgi-run version 1.5.2 will use Equinox artifact org.osgi:org.eclipse.osgi:3.10.100.v20150529-1857 and run with the Gogo shell, which seems to be the current approach.