Screenscraping made easy using jsoup and Maven

Sometimes in a developer’s life there is no clean API available to gather information from a web application .. no SOAP, no XML-RPC and no REST .. just a website hiding the information we’re looking for somewhere in its DOM hierarchy – so the only solution is screenscraping. Screenscraping always leaves me with a bad feeling – but luckily there is a tool that makes this job at least a bit easier for a developer .. jsoup to the rescue! ...

August 30, 2011 · 3 min · 526 words · Micha Kops

Contract-First Web-Services using JAX-WS, JAX-B, Maven and Eclipse

Using the contract-first approach to define a web service offers some advantages in contrast to the code-first approach. In the following tutorial we’re going to take a look at some details of this approach and we’re going to implement a real SOAP service using JAX-WS, Maven and the Eclipse IDE. Finally we’re going to run our service implementation on an embedded Jetty instance and we’re going to take a look at soapUI and how to test our service using this neat tool. ...

August 23, 2011 · 9 min · 1777 words · Micha Kops

Java EE 6, GlassFish and the Interceptor API

Aspect oriented programming and the definition of cross-cutting-concerns is made easy in Java EE 6 using interceptors. In the following tutorial we’re going to take a look at the different possibilities to apply interceptors to your EJBs at class or method level and how to setup a GlassFish instance to run the examples. Prerequisites We don’t need much for the following tutorial – just a JDK, Maven and GlassFish… Java Development Kit 6 GlassFish 3.1 Maven 3 ...

August 17, 2011 · 8 min · 1619 words · Micha Kops

Creating Portlets using Java Server Faces 2 and Liferay

Portlets are a common technology to create plug&play components for modern web applications and are specified by the Java Community Process in several specification requests. In the following tutorial we’re going to learn how to create custom portlets and how to deploy and embed them in Liferay, the popular open-source enterprise portal. In addition we’re taking a look at inter-portlet-communication and how to create portlets using annotations. Finally we’re building a portlet-state-aware Java-Server-Faces portlet using the jsf-portlet-bridge mechanism. ...

July 19, 2011 · 14 min · 2783 words · Micha Kops

Integrating Groovy in your Maven builds using GMaven

Often ant tasks are used in Maven builds but wouldn’t it be more attractive to integrate the Groovy language into our build process? GMaven is the answers to this problem and brings together Maven and Groovy. It allows us to execute Groovy scripts inline from our Maven configuration, from a local script or even from a remote location. In the following short examples I am going to show how to configure Maven to execute Groovy scripts from different locations. ...

July 12, 2011 · 4 min · 655 words · Micha Kops

Confluence User Profile Mobile vCard Plugin released

I’ve released a new plugin for the popular Confluence Wiki that extends the user profile with new tab that displays the user’s vcard as a QR code. This allows an easy import of address data from Confluence to your smartphone. Features Display of a Confluence user’s contact data as a QR code in a separate tab in the user profile More to be implemented .. Installation Just download the plugin from Atlassian’s Plugin Exchange and install it using the Universal Plugin Manager in your Confluence’s administration area That’s all .. nothing to configure here .. ...

June 18, 2011 · 1 min · 138 words · Micha Kops

Creating a LDAP server for your development environment in 5 minutes

I am currently working on a plugin that needs to receive some information from an LDAP/Active Directory using JNDI. That’s why I needed to set up a directory server in a short time and I didn’t want to waste much effort for here. Luckily for me the Apache Directory Studio saved my day and allowed me to set up everything I needed in a few minutes. Short and sweet: In this tutorial I’m going to show you how to configure everything you need in your Eclipse IDE and finally how to query the created LDAP server with a tiny java client using JNDI. ...

June 13, 2011 · 5 min · 914 words · Micha Kops

Message Driven Beans in Java EE 6

Message Driven Beans are no new concept due to the fact that they exist since EJB 2.0 but in Java EE 6 and the EJB 3.0 specification it is even more fun to use them. In this tutorial we’re going to take a look at the specification and create an example application that transfers some objects via the Java Message Service to a Message-Driven Bean deployed on a GlassFish application server. ...

June 5, 2011 · 12 min · 2430 words · Micha Kops

Oh JBehave, Baby! Behaviour Driven Development using JBehave

Behaviour Driven Development is the keyword when we’re talking about test scenarios written in an ubiquitous language, strong interaction with stakeholders, product owners or testers and well described, common understandable test scenarios. The popular JBehave framework is our tool of choice here and allows us to decouple our test stories from the test classes, offers an integration for web tests using Selenium and finally there’s a helpful Maven plugin for JBehave, too. ...

May 31, 2011 · 14 min · 2849 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