Lucene Snippets: Faceting Search

The latest snippet from my Lucene examples demonstrates how to achieve a facet search using the Lucene 4.0 API and how easy it is to define multiple category paths to aggregate search results for different possible facets. In the following example we’re indexing some books as a classical example and create multiple category paths for author, publication date and category afterwards .. Lucene Dependencies We simply need two dependencies here .. lucene-core of course and in addition the lucene-facet library .. I’ve added the declarations needed for Maven and SBT here .. if you’re using Gradle or Buildr you should’t have a problem to transfer the information needed ;) ...

August 28, 2012 · 4 min · 837 words · Micha Kops

New Plugin released: Quick Subtasks for JIRA

Recently after a long sprint planning meeting I had the pleasure to spend some time writing down the results of the team’s task breakdown in JIRA. In our process, each user story is documented as a JIRA issue and each task from the breakdown is saved as a subtask for the parent issue. Because I am too lazy in this situation I wrote the following plugin that allowed me to quickly create multiple subtasks for a selected JIRA issue. ...

August 21, 2012 · 2 min · 311 words · Micha Kops

Jeah we’ve won the Atlassian Codegeist 2012 Competition – or – The return of the Pirate Ninja Unicorn

Figure 1. Pirate-Ninja-Unicorn Logo Happy news for us, Theresa and I we’ve won the Atlassian Codegeist Competition 2012 with our Stash Readme Parser Plugin in the category: Best Stash Plugin. We had two other plugins in the game, the Stash QR Code Plugin and the HTTP Request Workflow Function for Jira If you’re interested please take a look at the plugins in the Atlassian Marketplace our funny looking Pirate Ninja Unicorn Website or the project’s overview in my blog. ...

August 12, 2012 · 1 min · 112 words · Micha Kops

Creating a Windows Executable from a Jar using Maven

Often in the life of a developer there is the need to create a windows executable for a Java application that is build and packaged in a Jar file. The following short example shows how to create an executable Jar first and a windows executable containing vendor information, a nice icon and other stuff afterwards by using a combination of the Maven Shade Plugin and the launch4j Plugin for Maven. ...

August 7, 2012 · 3 min · 542 words · Micha Kops

Video Manipulation using HTML 5 and Javascript

Some funny stuff can be done using HTML 5, canvas elements and the video events API. In the following example we’re using these techniques to apply graphic effects to a video embedded in a HTML page.. The Goal Please take a look at the following screencast on YouTube to get an idea of what the final example looks like or just take a look at the demo page. As you can see a video is rendered and a clone is displayed with a strange swirl effect applied. ...

August 5, 2012 · 3 min · 636 words · Micha Kops

Integration Testing IMAP, SMTP and POP3 with GreenMail

Having written some e-mail handling, sending or receiving library you’d like to run some integration tests against a real mail server? Then GreenMail might help you out here .. the framework is not quite new on the market but it is really easy to setup IMAP,SMTP or POP3 services with it and it comes with some helpful libraries making your life a bit easier here. That’s why I’ve come to the idea to share some examples for setting up different server instances, creating user accounts and – at last – fetching and validating e-mails… ...

July 30, 2012 · 9 min · 1833 words · Micha Kops

Aspects of Functional Programming in Java

Functional programming is a trending topic these days and a lot of Java programmers are hot for the features that modern functional programming languages might offer. Waiting for Java 8 and native closure support is a nice thing but for now we’re going to take a look at several Java frameworks that are trying to implement typical structures from those functional languages where possible using the capabilities of the Java language to emulate elements like higher-order-functions, closures, options and others … ...

July 16, 2012 · 16 min · 3233 words · Micha Kops

Task Scheduling in Java EE 6 on GlassFish using the Timer Service

Creating cronjobs or scheduled service executions is made really easy in Java EE 6. Scheduled tasks may be created in a programmatic style or simply by adding some annotations to an EJB. In the following tutorial we’re creating some simple scheduled tasks and let them run on an embedded GlassFish instance using the Maven Embedded GlassFish plugin.. Java EE 6 Maven Project from Archetype First of all we’re creating a new maven-ized project using one of the appropriate jee6 Maven archetypes ...

June 22, 2012 · 5 min · 956 words · Micha Kops

Creating updatable Java Applications using Getdown and the Getdown Maven Plugin

Many programmers have suffered when trying to setup an environment to handle updates for their application without much effort. Some tried Java Web Start for this purpose and many encountered difficulties with this approach. Now there is getdown that aims to replace Java Web Start by offering a simple architecture to handle updates that is fast, realiable and the only thing you need is a normal http server. Though getdown lets us handle our updates really easy it is possible to make this process even easier with the getdown maven plugin. ...

May 27, 2012 · 5 min · 885 words · Micha Kops

Compiling CoffeeScript with Maven

CoffeeScript is a neat language that is transcompiled into JavaScript but is more predictable and allows to write the same code with 1/3 fewer lines and of course with a (imho) nicer syntax. CoffeeScript is nice but a vivid integration into our application build lifecycle with Maven is better and that is what the following example is all about. Maven Dependencies Though there are some alternatives, we’re using brew here so please add the following dependency to your Maven project: ...

May 18, 2012 · 2 min · 375 words · Micha Kops