Programmers' Pain
28Feb/112

maven-duplicate-finder-plugin: find duplicate classes in maven artefacts

Lately I was looking for a Maven plugin to solve the problem that I want a certain Maven build to fail as soon as new duplicate classes have been introduced by other developers / third party dependencies while knowing that I already have some duplicate classes that I can't get rid of right now. Basically a duplicate classes detector with the possibility to define an exclude list - that's where the maven-duplicatefinder-plugin of Ning Inc. will give you a helping hand.

9Feb/115

maven-jarsigner-plugin: sign multiple jar files

Image from the Nuvola icon theme for KDE 3.x by David Vignoni Source: http://www.icon-king.com (LGPL)

The maven-jarsigner-plugin is a pretty handy Maven plugin if you want to sign the jar file produced by your Maven artefact build. The plugins documentation does provide several examples for that use case.

But if you want to sign just some jar files in the scope of your Maven build - especially if you need to apply certain include / exclude patterns - than the documentation provides only the configuration options you have to put together to make it work. Here's an example how to sign several jar files using include / exclude patterns.

2Feb/110

Things you shouldn’t do #1: Recursive Maven Builds

Recursion - You gotta know when to stopToday I've found a new way to kill the resources of my development PC via doing recursive Maven builds. Yes, recursive! Why? Because I can and it's fun! It started with an pretty old part of a Maven build which used Python scripts to compile Java classes outside of the Maven artefact scope. Those classes are than used to launch a little helper JVM which resolves the used annotations of a class you've passed to stdin and prints the annotations class name to stdout. You know, the usual stuff you do in case the used Java decompiler doesn't support Java annotations. It all started with a Maven project which did call a Python script...