In this post I’m using the Maven Enforcer plugin to break the build when certain files don’t follow the expected naming convention. It’s always a good idea to take the time and implement these checks inside the build pipeline. The alternative is hoping that code reviewers will spot the problems, which is a manual, tedious and error prone approach. Automate all the things! Continue reading “Validate filename conventions with Maven Enforcer plugin”
In this post we’ll create a small Java application, run it inside a Docker container, and use IntelliJ IDEA to debug. The source code is available here. This is a rather large post, so take your time.
Code Coverage is a useful set of metrics that show you how much of your code you’re impacting during testing. It doesn’t say much about the quality of your tests (you can read more in the old post What is code coverage?), but a 30% coverage is definitely worse than 90%. Let’s see how we can use JaCoCo to see our code coverage in the Java world. We’ll check a few options to use it, such as using it manually, using it within a CI, breaking the build with it, etc. The assumption is we’re working with a Maven project.
As a Maven rookie, I often use the quickstart archetype from Maven when I want to create a new Maven project. Unfortunately, that archetype is a bit outdated, which means I have to tweak some details before I can actually use it. I guess I got a bit tired of this and I thought I could create my own archetype that is ready to use.
This post shows how to create a simple web application with maven. I have the relevant commits as well in GitHub for reference, in case you want to see in more details.
I started using Maven at work recently. Being a newbie, I find myself googling constantly (even though the answer is always on StackOverflow) about basic things. For reference, these are my most needed actions so far: Continue reading “Maven Tips”