Posts tagged ‘Equinox’
Martin Lippert is a senior consultant and coach at akquinet it-agile GmbH. His main work and research focuses on Agile Software Development, Refactoring, Eclipse-Technology, OSGi, Spring and Aspect-Oriented Programming.
MIchael Cotè an industry analyst with RedMonk interview Neil Barlett on e4, Equinox, OSGi and Android.
After letting it rest way to long, I finally got around to editing and publishing this short video with Neil Bartlett
from EclipseCon 2008. As the title implies, we talk about the next major version of Eclipse, “e4,” get into a discussion about the Equinox, and wrap up talking about Neil and other’s work on getting OSGi running on Android.
In software engineering, the programming paradigms of aspect-oriented programming (AOP), and aspect-oriented software development (AOSD) attempt to aid programmers in the separation of concerns, specifically cross-cutting concerns, as an advance in modularization. AOP does so using primarily language changes, while AOSD uses a combination of language, environment, and method.
Separation of concerns entails breaking down a program into distinct parts that overlap in functionality as little as possible. All programming methodologies—including procedural programming and object-oriented programming—support some separation and encapsulation of concerns (or any area of interest or focus) into single entities. For example, procedures, packages, classes, and methods all help programmers encapsulate concerns into single entities. But some concerns defy these forms of encapsulation. Software engineers call these crosscutting concerns, because they “cut” across multiple modules in a program.
The Spring Dynamic Modules for OSGi(tm) Service Platforms project makes it easy to build Spring applications that run in an OSGi framework. A Spring application written in this way provides better separation of modules, the ability to dynamically add, remove, and update modules in a running system, the ability to deploy multiple versions of a module simultaneously (and have clients automatically bind to the appropriate one), and a dynamic service model.
OSGi is a registered trademark of the OSGi Alliance. Project name is used pending approval from the OSGi Alliance.
How to create a Spring bundle project in maven (and eclipse…)
The Spring-OSGi project supplies a maven archetype that will create a Spring bundle project for you all set up and ready to go.
To create a new project simply type the following:
mvn archetype:create \ -DarchetypeGroupId=org.springframework.osgi \ -DarchetypeArtifactId=spring-osgi-bundle-archetype \ -DarchetypeVersion=1.0 \ -DgroupId=<your-project-groupId> \ -DartifactId=<your-project-artifactId> \ -Dversion=<your-project-version>
The result of this is a maven project that defines a simple bean, configures it using src/main/resources/META-INF/spring/bundle-context.xml and src/main/resources/META-INF/spring/bundle-context-osgi.xml, and provides unit and (out of container) integration tests. The project is packaged as an OSGi bundle.
There project does not contain a META-INF manifest yet – to generate one invoke the following command:
mvn package mvn org.apache.felix:maven-bundle-plugin:manifest
You should now see the MANIFEST under target/classes/META-INF/ folder (the upcoming 1.0.1 version will properly generate this folder under META-INF).
Note: if you haven’t already downloaded and installed the spring-osgi artifacts (by running ‘mvn install’ on the spring-osgi tree) you’ll need to add an additional parameter to the above command: -DremoteRepositories=http://s3.amazonaws.com/maven.springframework.org/milestone. If this parameter does not work for you first time, see the additional instructions here.