Dependency Manager sample projects :: Apache Felix Home Subprojects Dependency Manager Event Admin File Install Framework Gogo Shell Health Checks Inventory Log Logback Maven bundle plugin Maven SCR plugin Metatype Service Preferences Service Remote Shell Script console plugin Lightweight shell Shell TUI Web Console Downloads Documentation Documentation Downloads Getting Started News Community Apache Felix Project Info Contributing Projects Using Felix Development Coding Standards DEPENDENCIES file template Provisional OSGi API Policy Release Management Site How To Using the OSGi Compliance Tests FAQS Apache Felix Bundle Plugin Frequently Asked Questions Apache Felix SCR Plugin Frequently Asked Questions Subprojects Apache Felix Dependency Manager Guides Apache Felix Dependency Manager - Migrating from earlier versions Dependency Manager - Annotations Dependency Manager - Background Dependency Manager - Bundles and Dependencies Dependency Manager - Design Patterns Dependency Manager - Development Dependency Manager - History Dependency Manager - JavaDocs Dependency Manager - Migrating from other solutions. Dependency Manager - Performance Tuning Dependency Manager - Resource adapters Dependency Manager - What’s new in version 4? Dependency Manager Lambda What’s New in R15 Reference Dependency Manager - Adapter Dependency Manager - Aspect Dependency Manager - Bundle Adapter Dependency Manager - Bundle Dependency Dependency Manager - Components Dependency Manager - Configuration Dependency Dependency Manager - Dependencies Dependency Manager - External Links Dependency Manager - Factory Configuration Adapter Service Dependency Manager - Resource Adapter Dependency Manager - Resource Dependency Dependency Manager - Service Dependency Dependency Manager - Service Scopes Dependency Manager - Singleton Component Dependency Manager - Thread Model Dependency Manager Annotations Tutorials Dependency Manager - Annotations Dependency Manager - Getting Started Dependency Manager - Leveraging the shell Dependency Manager sample projects Apache Felix Event Admin Apache Felix File Install Apache Felix Framework Apache Felix Framework Bundle Cache Apache Felix Framework Configuration Properties Apache Felix Framework Frequently Asked Questions Apache Felix Framework Launching and Embedding Apache Felix Framework Usage Documentation Apache Felix Framework Security Apache Felix Gogo RFC 147 Overview Apache Felix Health Checks Apache Felix Inventory Printer Apache Felix Log Apache Felix Logback Apache Felix Maven Bundle Plugin (BND) Apache Felix Metatype Service Apache Felix OSGi Bundle Repository (OBR) Apache Felix Preferences Service Apache Felix Remote Shell Apache Felix Shell Apache Felix Shell TUI Apache Felix Web Console Extending the Apache Felix Web Console Web Console RESTful API Web Console Security Provider Extensions Branding the Web Console Providing Resources Providing Web Console Plugins Web Console Logging Web Console Output Templating Tutorials Apache Felix Application Demonstration Apache Felix OSGi Tutorial OSGi Frequently Asked Questions OSGI Tutorial Apache Felix Tutorial Example 1 - Service Event Listener Bundle Apache Felix Tutorial Example 2 Apache Felix Tutorial Example 2b Apache Felix Tutorial Example 3 Apache Felix Tutorial Example 4 Apache Felix Tutorial Example 5 Example 6 - Spell Checker Service Bundle Example 7 - Spell Checker Client Bundle Example 8 - Spell Checker Service using Service Binder Example 9 - Spell Checker Service using Declarative Services Apache License 2.0 Site map Documentation master Documentation master Documentation Subprojects Apache Felix Dependency Manager Tutorials Dependency Manager sample projects Edit this Page Dependency Manager sample projects You can download this archive which contains the following directories: felix-framework-6.0.1/ -> this is a felix framework with pre-installed dependency manager r13 artifacts, as well as with configadmin and metatype bundles (these dependencies are required by dm) hello.api/ -> provides a sample component using the dependency manager API. hello.lambda/ -> provides a sample component using the dependency manager Lambda API. hello.annotations -> provides a sample component using the dependency manager annotations. All samples can be built using either gradle or maven. To build with gradle, simply type "./gradlew jar", and to build with maven, type "mvn clean install". If you are using an http proxy, you must set the following environment: for gradle: export GRADLE_OPTS="-Dhttp.proxyHost=<ip> -Dhttp.proxyPort=<port> -Dhttps.proxyHost=<ip> -Dhttps.proxyPort=<port> for maven, you must setup your http proxy in your ~/.m2/settings.xml Once built, the three jars for all hello projects can be put in the felix-framework-6.0.1/bundles/ directory. Now start felix like this: cd felix-framework-6.0.1 java -jar bin/felix.jar You should then see the following logs displayed to stdout: HelloComponent started using Dependency Manager API HelloComponent started using Dependency Manager Lambda HelloComponent started using Dependency Manager Annotations You can also play with the dm shell commands. First, type "help dm": g! help dm dm - List dependency manager components scope: dependencymanager flags: compact, cp Displays components using a compact form nodeps, nd Hides component dependencies notavail, na Only displays unavailable components stats, stat, st Displays components statistics wtf Detects where are the root failures options: bundleIds, bid, bi, b <List of bundle ids or bundle symbolic names to display (comma separated)> [optional] componentIds, cid, ci <List of component identifiers to display (comma separated)> [optional] components, c <Regex(s) used to filter on component implementation class names (comma separated), can be negated using "!" prefix> [optional] services, s <OSGi filter used to filter some service properties> [optional] top <Max number of top components to display (0=all)> This command displays components callbacks (init/start) times> [optional] Now type "dm" in order to see all dependency manager components: g! dm [1] hello.annotations [3] hello.HelloComponent registered [2] hello.api [0] hello.HelloComponent registered [3] hello.lambda [1] hello.HelloComponent registered [10] org.apache.felix.dependencymanager.runtime [2] org.apache.felix.dm.runtime.DependencyManagerRuntime registered active (DependencyManager-Component=*) bundle optional available org.osgi.service.packageadmin.PackageAdmin service required available org.osgi.service.log.LogService service optional unavailable Content licensed under AL2. UI licensed under MPL-2.0 with extensions licensed under AL2