Snippet: Java 9 Modules and JPMS

Playing around with the new module system in Java 9 I simply wanted to write down how to achieve the most basic tasks. Therefore I created the following module how-to based upon a simple demonstration project consisting of two dependant modules. Figure 1. Modules Component-Diagram Prerequisites and Setup We need an early access build of the Java ™ 9 JDK, available for download here. In addition we should make sure, that our environment variable JAVA_HOME is set to the corresponding directory and calling java -version returns something similar to this: ...

April 17, 2017 · 6 min · 1240 words · Micha Kops

Wiring made easy using OSGi Blueprint and Apache Karaf

The OSGi Blueprint Container specification allows us to use dependency injection in our OSGi environment, declarative import and export of OSGi services, registering lifecycle listeners and wiring dependencies into our services with a few lines of XML code. In the following tutorial we’re first building an OSGi bundle classical style and afterwards take a trip into the advantages of the Blueprint specification. Our OSGi container of choice here will be Apache Karaf a lightweight container with a lot of nice features and – of course – blueprint enabled… ...

April 16, 2012 · 9 min · 1705 words · Micha Kops

Confluence Social Comments Plugin

I have created a new, free plugin for Confluence, the popular enterprise wiki. The plugin allows you to notify users of ongoing discussions in comments on a confluence page by posting a specific token including the user’s name like this: “@username:” Features Configurable notification settings in the administration area Several placeholders to be used in the e-mail template for the notifications User filtering to avoid sending duplicate e-mails For more detailed information take a look at the Maven generated project website ...

May 30, 2011 · 1 min · 197 words · Micha Kops

How to create a Confluence SOAP Component in 5 Minutes

You’re using the popular Confluence wiki? You’re using its RPC/SOAP API and missing a function you really need? Just extend the capabilities of the Confluence RPC API by programming a custom web service component – it is really easy and also well documented. In this tutorial we’re going to take a look on how to quickly implement a SOAP service, securing it and putting its methods in a transactional context. Prerequisites Maven >=2 JDK >= 5 Confluence Wiki >= 3.0 (for a quick installation guide take a look at this article) SoapUI for Testing ...

October 24, 2010 · 7 min · 1309 words · Micha Kops

How to create a simple OSGi Web Application using Maven

In this tutorial we will take a look at the development of a simple OSGi Web Application and what tools can save us some time. The Maven Bundle Plugin makes our life much easier here as does the OSGi Bundle Repository that offers some nice bundles – in our case the servlet API and an embedded Jetty web server. So lets develop some bundles .. Prerequisites You are going to need a JDK (>=5), Maven2, the Apache Felix OSGi implementation and and text editor/http://eclipse.org/[IDE] of your choice. ...

July 25, 2010 · 8 min · 1505 words · Micha Kops

Atlassian Snippets

Disable YUI compressor <plugin> <groupId>com.atlassian.maven.plugins</groupId> <artifactId>maven-jira-plugin</artifactId> <version>${amps.version}</version> <extensions>true</extensions> <configuration> <compressResources>false</compressResources> [..] </configuration> </plugin> Confluence – Get favourites by user Using the label manager. List getFavouriteSpaces(String username) Confluence – Determine the base URL Using the SettingsManager: String baseUrl = settingsManager.getGlobalSettings().getBaseUrl(); Confluence – Get the context path Using the BootstrapManager: String contextPath = bootstrapManager.getWebAppContextPath(); Confluence – Using Velocity Template for a Macro final VelocityContext contextMap = new VelocityContext(MacroUtils.defaultVelocityContext()); contextMap.put("key", obj); // references obj as variable named $key in the velocity template VelocityUtils.getRenderedTemplate("path/to/template.vm", contextMap); ...

March 1, 2010 · 3 min · 544 words · Micha Kops