Using OSGi? Need logging?
pax-logging-api-1.0-RC2.jar
pax-logging-service-1.0-RC2.jar
several major open-source projects are already using it to simplify their logging story.
A subtle blend of english and malay puns, with a dash of software news, and a hearty dose of reality
> mcculls @ 19:54 0 comments
> mcculls @ 23:52 0 comments
pom.xml
.> mcculls @ 16:46 0 comments
> mcculls @ 11:56 0 comments
> mcculls @ 16:19 0 comments
> mcculls @ 14:50 2 comments
http://repository.ops4j.org
if you have 0.6.0 installed, you can use pax-update to upgrade your existing scripts (must be run from inside the scripts bin directory).
Release Notes - Pax Construct - Version 0.6.1
Bug
Improvement
New Feature
> mcculls @ 14:49 0 comments
> mcculls @ 10:22 0 comments
> mcculls @ 23:44 0 comments
Only a couple more weeks left to submit talks or tutorials for the next OSGi DevCon. I've submitted one tutorial and a talk so far:
An introduction to Pax tools for OSGi
OSGi service injection using Guice
Have you got an interesting story or project involving OSGi? If so then submit it soon - I don't want to be the only speaker :)
> mcculls @ 23:41 0 comments
mvn org.ops4j:maven-pax-plugin:0.2.1-SNAPSHOT:clone
cd ~/Code/ops4j/pax/radman ; mvn org.ops4j:maven-pax-plugin:0.2.1-SNAPSHOT:clone
cd /tmp ; ~/Code/ops4j/pax/radman/target/pax-clone-radman
> mcculls @ 03:07 4 comments
I've just made the new version of Pax-Construct generally available on the OPS4J repository:
http://repository.ops4j.org/maven2/org/ops4j/pax/construct/scripts/0.2.0-ga/scripts-0.2.0-ga.zip
detailed documentation for the scripts and Maven2 plugins can be found on the following site:
http://www.ops4j.org/projects/pax/construct/index.html
including an example of using Pax-Construct to assemble and deploy Spring Dynamic Modules!
http://www.ops4j.org/projects/pax/construct/examples/spring-osgi.html
Other noteworthy features:
> mcculls @ 21:45 0 comments
> mcculls @ 09:36 0 comments
I've uploaded some documentation for the maven-inherit-plugin in the usual format:
http://www.ops4j.org/projects/pax/construct/maven-inherit-plugin
and improved the code to use custom Javadoc tags to get the extended plugin details.
For example:
/**
* @extendsPlugin archetype
* @extendsGoal create
* @goal create-project
* @requiresProject false
*/
public class OSGiProjectArchetypeMojo extends MavenArchetypeMojo
{
// if you override member fields, remember to propagate the values using reflection
}
> mcculls @ 17:38 2 comments
<plugin>
<groupid>org.ops4j.pax.construct.ng</groupid>
<artifactid>maven-inherit-plugin</artifactid>
<executions>
<execution>
<goals>
<goal>inherit</goal>
</goals>
</execution>
</executions>
</plugin>
...
<pluginRepositories>
<pluginRepository>
<id>ops4j-repository</id>
<url>http://repository.ops4j.org/maven2</url>
</pluginRepository>
</pluginRepositories>
@extendsPlugin {plugin}
@goal {local-goal}
@extendsPlugin {plugin}
@extendsGoal {inherited-goal}
@goal {local-goal}
/**
* @extendsPlugin archetype
* @extendsGoal create
* @goal create-project
* @requiresProject false
*/
https://scm.ops4j.org/repos/ops4j/projects/pax/construct/maven-inherit-plugin
> mcculls @ 06:26 0 comments
pax-wrap-jar -g commons-logging -a commons-logging -v 1.1 -- -DembedTransitive
pax-wrap-jar -g commons-logging -a commons-logging -v 1.1 -- -DwrapTransitive -Doverwrite
> mcculls @ 01:08 0 comments
> mcculls @ 21:50 1 comments
Had some really useful discussions during the OSGi Community Event in Munich about wrapping complex artifacts such as Hibernate3. The next drop of Pax Construct will try to handle dependencies for you as much as possible (automatically embedding / wrapping / importing them as required) so with one command you can drag an artifact into your OSGi project without having to repeatedly deploy or compile to track down those annoying missing dependencies.
Also planned: OBR support to search for artifacts based on your bundle's imports :)
As ever, let me know via JIRA or email if there's anything that would make OSGi development that little bit easier!
> mcculls @ 00:24 2 comments
My talk from the 2007 OSGi Alliance Community Event is now online:
http://www2.osgi.org/wiki/uploads/Conference/OSGiCommunity-McCulloch.pdf
along with slides from all the other talks - well worth perusing.
http://www2.osgi.org/Conference/2007CommunityEvent
> mcculls @ 04:28 0 comments
FYI, I've just made an initial drop of my Guice-OSGi laboratory project:
http://wiki.ops4j.org/confluence/display/ops4j/Guice-OSGi
org.ops4j.guice-osgi.core-0.1.0.jar
org.ops4j.guice-osgi.core-0.1.0-javadoc.jar
org.ops4j.guice-osgi.core-0.1.0-sources.jar
which lets you use Guice to access / register OSGi services - for example:
@Inject
@OSGiServiceRegistration
ExampleService exported;
would register the object injected into 'exported' as an OSGi service, and:
@Inject
@OSGiService
ExampleService imported;
would inject a proxy into 'imported' which delegates to the OSGi service.
example (use 'mvn clean install pax:provision' to try it out)
It's capable of lots more (custom LDAP filters, injected listeners, etc.) but I have a flight to catch in a few hours and need to finish my packing :) The integration tests checked into subversion contain more examples.
It doesn't do everything Spring-OSGi does, but then again it is only one bundle of ~500k ;)
(PS. I've also released 0.1.6 of the Pax Construct tools - busy week!)
> mcculls @ 16:09 0 comments
I've had my macbook for nearly five months and use it as my primary dev box. Last month I took it with me to Sweden to run some OSGi tutorials - before the very first session I calmly closed the lid, wandered over to the conference room and opened it up to see... nothing!
People were already wandering in so decided to do a quick reboot - but instead of the reassuring apple logo I now saw a flashing question mark folder (gulp). Luckily the tutorial was available on the intranet (FYI, it's based on Pax Construct) so I was able to grab a spare laptop and continue.
Anyway after the tutorial session I absentmindedly turned on my macbook, which now started ok!
So is this a new mac feature, auto-repair? Sadly not... since then its behaviour has been erratic - occasional beach-balls, looking like the system had frozen only to return after a few minutes. Tried turning off spotlight indexing (nice performance boost) which helped for a bit but the problem returned. Tried a full archive, erase and re-install with minimum setup which I thought had nailed it, but this weekend my macbook went totally rosak :(
No hard disk, nothing... nowhere to reinstall MacOSX, no chance of recovering data - thankfully I still had the full image backup from a few days ago (plus most of my work is online these days).
So my macbook is now at the local Apple support centre and I'm back to using my trusty Linux box that I built from scratch (and ironically contains a still-working HDD I rescued from an ancient Dell laptop and now use for temporary storage).
So here's the MOTD... if you see any errors like the following in your system log:
disk0s2: 0xe0030005 (UNDEFINED)
make sure you have any critical data backed up and get your macbook checked out asap.
> mcculls @ 20:57 1 comments
Hi folks,
By popular demand I've released Pax Construct 0.1.5
http://repository.ops4j.org/maven2/org/ops4j/pax/construct/scripts/0.1.5/scripts-0.1.5.zip
This release has the following improvements:
* simpler project layout
* support for adding repositories, removing bundles, embedding jars
inside bundles, and using bundles (ie. inter-bundle dependencies)
* better error checking and recovery
that makes it a lot easier to construct more complex OSGi projects.
Remaining issues have been pushed to 0.1.6, which is targeted for
mid-to-late June, and will include the project snapshot feature along
with (hopefully!) more documentation and samples.
Please let me know if you have any problems using this new release.
--
Cheers, Stuart
> mcculls @ 16:24 0 comments
Just found out that my talk on using Maven to build OSGi projects has been accepted for the "short talks" section of the OSGi Alliance Community Event!
So, now there's even more reason to attend the event - if only to ask difficult questions / heckle ;)
> mcculls @ 11:29 0 comments
Almost finished my round of OSGi tutorials in Malmo, Sweden. It's been a busy time, last weekend I had two sessions back to back from 0830 to 1900! Things are a bit quieter now, so I'm going to spend time on the 0.1.5 release of Pax Construct, improving it based on feedback from the tutorials. I'm also going to add a command to create a template of a bundle that embeds a jarfile, which should make various people happy.
Anyway, on to the real topic of this post - in creating the tutorial I wrote a couple of useful scripts which let you convert your local Maven repository into a remote repository, by fixing up the necessary maven metadata and adding SHA-1 digests. You can grab the scripts from my OPS4J page at http://wiki.ops4j.org/confluence/display/~mcculls/%21sh.
I used these scripts to create an offline repository for the tutorial - by just cleaning out my local repo, running through all the exercises, copying the local repo to another location and running the scripts to add the missing metadata (see example on the !sh page). I also provided a modified settings.xml file which added mirror repos relative to the maven installation (such as file:${M2_HOME}/../../artifacts) for all the main repo ids.
This mean people could work the tutorial offline, and also meant that even when online the network wasn't hammered by everyone downloading exactly the same set of artifacts... the only downside is the extra work keeping the mirror up-to-date.
> mcculls @ 17:13 2 comments
I recently wrote a patch for Guice, which adds OSGi metadata to the jarfile and fixes some classloader issues when running on OSGi. Just apply this patch to the current Guice trunk (and copy the attached bnd-0.0.130.jar to the lib/build folder) and do "ant clean dist".
You can now take the Guice jar from build/dist and use it in any OSGi framework - there's an example over at OPS4J:
https://scm.ops4j.org/repos/ops4j/laboratory/users/stuart/peaberry
( btw, peaberry is a simple entity framework to test Guice and AOP on OSGi ... it only provides partial entity bean support, hence the name: Peaberry ;)
> mcculls @ 13:00 0 comments
Have you ever wanted to try OSGi, but found setting up the build and working out the manifest too much of a chore?
If so then help is at hand - over the last few months, I have been developing a set of Maven archetypes and plugins to automate much of the manual work required in creating an OSGi project. Recently I also provided Windows batch files and Linux shell scripts to make it even easier:
http://wiki.ops4j.org/confluence/display/ops4j/Pax+Construct
All you need is Maven2 and a Java5 runtime - the best part is the OSGi manifest attributes are automatically calculated for you by Peter Krien's wonderful bnd tool, connected to Maven by the maven-bundle-plugin from the Apache Felix project.
For example, the following commands would create a simple skeleton OSGi web application ... and deploy it to Equinox:
pax-create-project -g simple.project -a osgi-web-app
cd osgi-web-app
mvn install
pax-wrap-jar -g javax.servlet -a servlet-api -v 2.5
pax-import-bundle -g org.ops4j.pax.logging -a api -v 0.9.4
pax-import-bundle -g org.ops4j.pax.logging -a jcl -v 0.9.4
pax-import-bundle -g org.ops4j.pax.logging -a slf4j -v 0.9.4
pax-import-bundle -g org.ungoverned.osgi.bundle -a http -v 1.1.2
pax-create-bundle -p my.osgi.code.myBundle -n myBundle
mvn install pax:provision
all you need to add is the internal application code ;)
> mcculls @ 02:45 2 comments
> mcculls @ 18:19 0 comments
I've always wanted to try out a mac, and the recent batch of Intel Core 2 Duo macbooks really caught my eye. However, I managed to resist the temptation last year ... as my wife Hayfa kept reminding me, we didn't need more computers cluttering up the house (we already have a dell laptop and an AMD64 desktop that I built in the UK).
Anyway, recently I moved to a new job (working on OSGi stuff) and this triggered a new bout of window ...err... mac-browsing. I'd been looking at the 2GHz mid-range model, but it wasn't in stock in KL. Then one weekend when Hayfa was in Penang (funny how I buy these things when my sayang isn't around) I saw an advert for MacCity in Cineleisure - RM3999 for the basic model for the first 10 customers between 3 and 5pm, a saving of RM400!
So I drove to Cineleisure, parked, wandered over to the store just before 3pm, mulled things over a bit, decided to queue and got the next-to-last one!
> mcculls @ 18:31 3 comments