--- /dev/null
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.argeo.commons.osgi</groupId>
+ <version>0.1.3-SNAPSHOT</version>
+ <artifactId>dep</artifactId>
+ <relativePath>..</relativePath>
+ </parent>
+ <artifactId>org.argeo.osgi.dep.stdruntime</artifactId>
+ <packaging>pom</packaging>
+ <name>Dep OSGi Runtime</name>
+ <dependencies>
+ <!-- OSGi Boot (and Equinox) -->
+ <dependency>
+ <groupId>org.argeo.commons.osgi</groupId>
+ <artifactId>org.argeo.osgi.boot</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <!-- Logging -->
+ <dependency>
+ <groupId>org.argeo.commons.basic</groupId>
+ <artifactId>org.argeo.basic.dep.log4j</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ </dependency>
+ <!-- Spring OSGi -->
+ <dependency>
+ <groupId>org.springframework.osgi</groupId>
+ <artifactId>org.springframework.osgi.core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.osgi</groupId>
+ <artifactId>org.springframework.osgi.extender</artifactId>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.argeo.commons</groupId>
+ <version>0.1.3-SNAPSHOT</version>
+ <artifactId>osgi</artifactId>
+ <relativePath>..</relativePath>
+ </parent>
+ <groupId>org.argeo.commons.osgi</groupId>
+ <artifactId>dep</artifactId>
+ <name>Commons Server Dependencies</name>
+ <packaging>pom</packaging>
+ <modules>
+ <module>org.argeo.osgi.dep.stdruntime</module>
+ </modules>
+</project>
\ No newline at end of file
<packaging>pom</packaging>
<modules>
<module>runtime</module>
+ <module>dep</module>
</modules>
</project>
\ No newline at end of file
public void start(BundleContext bundleContext) throws Exception {
OsgiBoot osgiBoot = new OsgiBoot(bundleContext);
osgiBoot.bootstrap();
-// try {
-// OsgiBoot.info("SLC OSGi bootstrap starting...");
-// osgiBoot.installUrls(osgiBoot.getBundlesUrls());
-// osgiBoot.installUrls(osgiBoot.getLocationsUrls());
-// osgiBoot.installUrls(osgiBoot.getModulesUrls());
-// osgiBoot.startBundles();
-// OsgiBoot.info("SLC OSGi bootstrap completed");
-// } catch (Exception e) {
-// e.printStackTrace();
-// throw e;
-// }
}
public void stop(BundleContext context) throws Exception {
}
public void bootstrap() {
+ long begin = System.currentTimeMillis();
System.out.println();
info("OSGi bootstrap starting...");
info("Writable data directory : "
installUrls(getModulesUrls());
checkUnresolved();
startBundles();
- info("OSGi bootstrap completed");
+ long duration = System.currentTimeMillis() - begin;
+ info("OSGi bootstra completed in "
+ + Math.round(((double) duration) / 1000) + "s (" + duration
+ + "ms), " + bundleContext.getBundles().length + " bundles");
System.out.println();
}