Separating Integration and Unit Tests with Maven, Sonar, Failsafe, and JaCoCo

Goal: Execute the slow integration tests separately from unit tests and show as much information about them as possible in Sonar. The first part – executing IT and UT separately – is achieved by using the maven-failsafe-plugin and by naming the integration tests *IT (so that the unit test running surefire-maven-plugin will ignore them whileContinue reading “Separating Integration and Unit Tests with Maven, Sonar, Failsafe, and JaCoCo”

Visualize Maven Project Dependencies with dependency:tree and Dot Diagram Output

The dependency:tree goal of the Maven plugin dependency supports various graphical outputs from the version 2.4 up. This is how you would create a diagram showing all dependencies in the com.example group in the dot format: (The output is just a text file with the extension Graphviz gv.) To actually produce an image from theContinue reading “Visualize Maven Project Dependencies with dependency:tree and Dot Diagram Output”

Most interesting links of December

Recommended Readings The Netflix Chaos Monkey – how to test your preparedness for dealing with a system failure so that you won’t experience nasty wakeup when something really fails in Sunday 3 am? Release a wild, armed monkey into your datacenter. Watch carefuly what happens as it randoly kills your instances. This is exactly whatContinue reading “Most interesting links of December”

Hacking A Maven Dependency with Javassist to Fix It

Have you ever wondered what to do when needing “just a small change” to a third-part library your project depended on? This post describes how to use Maven and Javassist to take a dependency of your project, instrument it to modify its behavior, re-pack it, and release it as an artifact with a different nameContinue reading “Hacking A Maven Dependency with Javassist to Fix It”

Tools for Renaming the Package of a Dependency with Maven

If you need to rename the Java package of a 3rd party library, e.g. to include it directly in your project while avoiding possible conflicts, you can use one of the following Maven plugins (and they may be more) in the package lifecycle phase: Uberize plugin (latest – org.fusesource.mvnplugins:maven-uberize-plugin:1.20) – originally inspired by the ShadeContinue reading “Tools for Renaming the Package of a Dependency with Maven”

Most interesting links of November

This month has been quite interesting, among others I ‘ve picked up several blogs by Adam Bien. I really like his brief, practical and insightful posts 🙂 Java, Jave EE, architecture etc. EJB 3.1 + Hessian = (Almost) Perfect Binary Remoting – “With hessian it is very easy to expose existing Java-interfaces with almost noContinue reading “Most interesting links of November”

Most interesting links of October

Few of my favourite themes this month – TDD, performance, build tools/Maven. Plus a usefel JS library, news from the Java community x Oracle world etc. About dying JCP and too silent Oracle (or mostly silent) – a summary of the latest issues and hot topics in the Java community that cause lot of rumorContinue reading “Most interesting links of October”