Apache Felix Dependency Manager - Migrating from earlier versions :: 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 Guides Apache Felix Dependency Manager - Migrating from earlier versions Edit this Page Apache Felix Dependency Manager - Migrating from earlier versions Below is a guide to help you migrate from version 3. Whilst older versions obviously still exist, we don’t think people are still actively using them. Migrating from version 3 DependencyManager 4.0 has some API changes that need to be taken into account when migrating from DependencyManager 3. A dependency can no longer be shared accross components. You no longer have to call setInstanceBound() when adding a dependency from within the init() method of a component. Therefore the setInstanceBound() method has been removed from all Dependency interfaces. in the Dependency interface, the following method have been removed: isInstanceBound, invokeAdded, invokeRemoved, createCopy. In the Component interface, the "Object Component.getService()" method has been replaced by the "<T>T getInstance()" method. In the Component interface, the "void addStateListener(ComponentStateListener listener) method" has been replaced by the "add(ComponentStateListener listener)" method. In the Component interface, the "start", "stop", "getDependencies" methods have been removed. In the Component interface and in the DependencyManager class, the createTemporalServiceDependency() method is now taking a timeout parameter: createTemporalServiceDependency(long timeout). The ComponentStateListener interface has changed: it is now providing a single "changed(Component c, ComponentState state)" method. The DependencyManager 4 Shell commands are no longer available for framework specific shell implementations, and support the gogo shell only. The TemporalServiceDependency interface has been removed. The Annotations processor is not generating anymore the Import-Service/Export Service by default (no need to specify the "build-import-export-service=false" option in the annotations plugin if you don’t need to generate automatically the deprecated headers). The Dependency Manager metatype annotations are now deprecated and it is encouraged to use standard bnd metatypes annotation instead. See org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/annot/DictionaryConfiguration.java for an example. You can also check http://www.aqute.biz/Bnd/MetaType for more information about the bnd metatypes annotations. Dependency Manager is now fully built using bndtools, and there is no Maven annotation plugin anymore. However, the workaround is simply the use a "_plugin" option in the pom, and to declare a dependency inside the "plugin" configuration. Notice that in the R1 version, we are not pushing DM distribution to maven, so you have to do manually push the DM artifacts in your own nexus server. We’ll try to release DM artifacts to maven central in the next release (R2). For example: <project ...> <dependencies> ... <dependency> <groupId>org.apache.felix</groupId> <artifactId>org.apache.felix.dependencymanager.annotation</artifactId> <version>4.0.0</version> </dependency> </dependencies> <build> <plugins> ... <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> <version>2.5.0</version> <extensions>true</extensions> <configuration> <instructions> <Bundle-Name>Test</Bundle-Name> <Bundle-SymbolicName>test</Bundle-SymbolicName> <Import-Package>*</Import-Package> <Private-Package>test.dmannotations.withbndplugininvokedfrompom</Private-Package> <_plugin>org.apache.felix.dm.annotation.plugin.bnd.AnnotationPlugin;log=debug</_plugin> </instructions> </configuration> <dependencies> <dependency> <groupId>org.apache.felix</groupId> <artifactId>org.apache.felix.dependencymanager.annotation</artifactId> <version>4.0.0</version> </dependency> </dependencies> </plugin> </plugins> </build> </project> Content licensed under AL2. UI licensed under MPL-2.0 with extensions licensed under AL2