A quick search online gives us a few places where our dependencies can be found. I found a copy of the artifacts on one of the Maven repositories (here Ibiblio
, a widely used online repository, under http://mirrors.ibiblio.org/pub/mirrors/maven2/).
The manifests for commons-fileupload
and commons-io
already contain OSGi information, so we can install them right away. Those bundles belong to the Common Services start level (1).
g! bundlelevel -i 1
To save us some typing, we'll declare a common variable for the Maven repository base URL:
g! mvnrepo = http://repo2.maven.org/maven2
http://repo2.maven.org/maven2
Install and start the commons-io
bundle:
g! start $mvnrepo/commons-io/commons-io/1.4/commons-io-1.4.jar
And the commons-fileupload
bundle:
g! start $mvnrepo/commons-fileupload/commons-fileupload/1.2.1/commonsfileupload-
1.2.1.jar
Notice that we've used the start
command to install and then start the bundles in one request.