- Descargar pax-runner y ponerlo en el PATH
- Asegurarnos que el valor de JAVA_HOME es correcto
- Ejecutar pax-run.sh o pax-run.bat
Veréis cómo “automágicamente” Pax Runner comienza a descargar un contenedor Apache Felix y lo ejecuta, dejando la consola de comandos lista para hacer, p.ej. “ps” y ver todos los bundles que ha descargado (apenas cinco) y que están en estado “ACTIVE”
C:\pax-runner-0.5.3\bin > pax-run
______ ________ __ __
/ __ / / __ / / / / /
/ ___/ / __ / _\ \ _/
/ / / / / / / _\ \
/__/ /__/ /__/ /_/ /_/Pax Runner from OPS4J – http://www.ops4j.org
——————————————–-> Using config [classpath:META-INF/runner.properties]
-> Protocol [mvn] handler started
-> Protocol [wrap] handler started
-> Scanner for schema [scan-bundle] started
-> Scanner for schema [scan-dir] started
-> Scanner for schema [scan-file] started
-> Scanner for schema [scan-pom] started
-> Provision from [.!/*.jar]
-> Provision from [scan-dir:.!/*.jar]
-> Installing bundle [{location=file:/C:/pax-runner-0.5.3/bin/./pax-runner-0.5.
3.jar,startlevel=null,shouldStart=true}]
-> Downloading bundles…
-> Execution environment [J2SE-1.5]
-> Starting platform [Felix 1.0.1]. Runner has succesfully finished his job!Welcome to Felix.
=================ps
-> START LEVEL 6
ID State Level Name
[ 0] [Active ] [ 0] System Bundle (1.0.1)
[ 1] [Active ] [ 1] org.osgi.r4.compendium (1.0.0)
[ 2] [Active ] [ 1] Apache Felix Shell Service (1.0.0)
[ 3] [Active ] [ 1] Apache Felix Shell TUI (1.0.0)
[ 4] [Active ] [ 5] OPS4J Pax Runner – Core (0.5.3)
shutdown
-> ->
-> Shuting down platform…
-> Destroying platform process…
Si en vez de pax-run.sh (sin parámetros) ejecutamos pax-run.sh "--platform=equinox", lo que conseguimos es arrancar un contenedor Eclipse Equinox 3.2.1 y con un conjunto de bundles instalados ligeramente diferentes. (Por cierto, el comando para ver los bundles en la consola de Equinox es “ss” y para salir el comando es “close”).