Customize JAR manifest entries with Maven/Gradle

How many times have you found yourself in a situation where you can’t tell if the artifacts used by the application are the correct ones or not? How many times have you looked at a bug report stating that the problem is caused by version X of a particular artifact but you are certain the bug was fixed in said release? On closer inspection (after unpacking, debugging, even decompiling!) you find that the artifact in production is not the right one even though the version appears to be the correct one. One option we have to mitigate this problem is Read More


Maven scopes vs. Gradle configurations

Both Maven and Gradle are popular choices when it comes to building Java projects. These tools share common traits but there are some key differences that make you more productive depending on a particular scenario (no, I’m not referring to the XML DSL vs. Groovy/Kotlin DSL schism), case in point scopes vs. configurations. Scopes and configurations are used by each tool to define dependencies and how they affect different classpaths, such as the compilation and runtime classpaths. Maven defines 6 scopes: compile, runtime, provided, system, test, and import. Gradle on the other hand defines the following configurations when the Java Read More


Contributing to JavaFX

Johan Vos (@johanvos) has setup a mirror of the official OpenJFX codebase as a repository at Github (https://github.com/javafxports/openjdk-jfx. This repository allows anyone interested in contributing to JavaFX to be able to send patches to the project. Would you like to join the efforts to move JavaFX forward? These are the steps you must follow with the current pipeline: Have a Github account. It only takes a few minutes to setup and it’s free! Have a bug/feature in mind you’d like to see fixed/added to JavaFX. Browse the list of open issues at https://github.com/javafxports/openjdk-jfx/issues to see if you can help; discussing Read More


2017 in Review

2017 has been a hectic year to say the least, however on the JVM side of things I’m quite happy with the results so far. We’ve got a brand new release of Java in September! The feature list added to Java9 is impressive, you can catch a glimpse of what’s new in Trisha’s (@trisha_gee) Real World Java 9 talk. Of course the elephant in the room when it comes to Java 9 is Jigsaw. Developers around the world are still trying to figure out how to get their tools and libraries to work with the new modular system, I recommend Read More


First JCP EC face-to-face meeting in 2018

The JCP Executive Committee meets once a month to discuss topics of relevance to the Java platform and its community. Being a group of 25 members distributed around the world the preferred option for these meetings is the remote one, however the EC comes together 3 times a year to meet face-to-face, the first of these meetings just happened a few days ago at IBM’s campus in Hursley, UK. First day of the January #JCP EC meeting hosted by @IBM in Hursley pic.twitter.com/ZoUVpJn1mv — JCP (@jcp_org) January 30, 2018 This was my second meeting as part of the JCP EC Read More


Keeping your codebase healthy

Maintaining a project in a healthy state should have a higher priority in light of recent events. There are a handful of techniques and measures that can be applied to keep the codebase neat and tidy. If your project is built with Gradle then the following list may come in handy when taking matters in to your own hands: ossindex versions license jdeps jacoco checkstyle pmd findbugs/spotbugs codenarc sonarqube Each plugin takes care of an specific dimension and together they can strengthen your codebase. Let’s begin with the ossindex plugin. This plugin scans project dependencies and checks if there are Read More


Happy 9th Birthday Griffon!

Today marks the 9th anniversary of Danno’s announcement of Griffon 0.0. It’s been quite the ride since then, and lots of fun if I may say so. As Danno noted, Griffon began life as a fork of the Grails codebase at the time. He literally copied the Grails source, removed everything that was related to HTTP and Servlets and added Swing on top. This allowed Griffon to bootstrap itself very quickly and begin its own journey. The feedback we’ve got was very positive and we happily continued adding more features, letting Griffon to have it’s own identity. Plugin support was Read More


Open Source Tools: Reports – Coverage

Measuring code coverage is a good way to figure out if a project has a healthy codebase or not. There is no magic number for coverage, as with many things it software the right answer depends on the context; this being said some projects strive for the perfect 100% and will relentlessly pursue that goal, no matter what. There are a handful of projects in the Java space that can calculate the coveted number: Cobertura, JaCoCo, and OpenClover. Of the three I’d say JaCoCo is the one I use most for the following reasons: JaCoCo delivers better branch coverage statistics Read More


Open Source Tools: Build – Travis & AppVeyor

Open Source projects have higher chances for success if their build instructions are clear and easily reproducible by anyone. It’s a very good idea to include a file that contains environment setup and clear build instructions to be followed. Even better would be to additionally configure a remote build mechanism that publicizes build status and results. This build mechanism can be used to Build and publish released binaries. Publish code coverage results and other quality gates. Build branches on demand, validating external contributions before merging (based on pull requests from GitHub for example). There are several options out there that Read More


Open Source Tools: Build – JitPack

Up until know we’ve discussed how to build projects using a couple of tools. Regardless of which one you pick you may need to deal with dependencies. The Java platform does not provide a specification for defining dependencies and their metadata and how to consume them, however the whole ecosystem has agreed on using JAR files as the binary packages and Apache Maven’s POM format as metadata. Often times you add a bit of configuration to your build file stating two things: the dependency coordinates used to locate the JAR file. the repository from where the metadata and the JAR Read More


ˆ Back To Top