@@ -13,3 +13,39 @@ The OSGi Setup Builder API is designed to be easily integrated into build tools
1313
1414License: [ Apache License Version 2.0] ( http://www.apache.org/licenses/LICENSE-2.0.html )
1515
16+ Creating a Eclipse Equinox Setup
17+ --------------------------------
18+
19+ ``` scala
20+ import de .tototec .osgi .setupbuilder ._
21+ import java .io .File
22+
23+ val bundles = Seq (
24+ " org.eclipse.osgi_3.8.1.v20120830-144521.jar" ,
25+ " org.eclipse.equinox.common_3.6.100.v20120522-1841.jar" ,
26+ " org.eclipse.equinox.console_1.0.0.v20120522-1841.jar"
27+ " org.apache.felix.gogo.command-0.12.0.jar" ,
28+ " org.apache.felix.gogo.runtime-0.10.0.jar" ,
29+ " org.apache.felix.gogo.shell-0.10.0.jar" ,
30+ " org.apache.felix.configadmin-1.6.0.jar"
31+ ).map(f => new File (" jars/" + f))
32+
33+ val setup = OsgiSetup (
34+ bundles = bundles,
35+ frameworkBundle = " org.eclipse.core" ,
36+ frameworkSettings = Map (
37+ " osgi.clean" -> " true" ,
38+ " osgi.console -> " " ,
39+ " eclipse.application.launchDefault " -> " false " ,
40+ " eclipse.consoleLog " -> " true " ,
41+ " osgi.bundles.defaultStartLevel " -> " 4 " ,
42+ " osgi.startLevel " -> " 6 "
43+ ),
44+ bundleConfigs = Seq(
45+ BundleConfig(symbolicName = " org.apache.felix.configadmin " , autoStart = true)
46+ )
47+ )
48+
49+ val builder = new EquinoxSetupBuilder(setup = setup, targetDir = new File( " target/ equinox " ))
50+ builder.build
51+ ```
0 commit comments