Category: Development Tools
-
JaCoCo Web Report Not Rendering Properly in GitHub Pages
PROBLEM When pushing JaCoCo web report to GitHub’s gh-pages branch, it does not render properly on the web. For example:- The GitHub pages are powered by Jekyll. By default, Jekyll does not allow directories or files that begin with a dot, pound sign, tilde or underscore. Since JaCoCo places all the image and CSS files… Read More…
-
IntelliJ IDEA 14.1: Better equals(), hashCode() and toString()
PROBLEM Let’s assume we want to create the default equals(), hashCode() and toString() with the following bean:- Most IDEs, including older version of IntelliJ, have code generation features that would create something similar to this:- While it works, the generated code is usually crazy horrendous. SOLUTION With IntelliJ 14.x, it allows us to select templates… Read More…
-
IntelliJ IDEA: Generating Immutable Classes and Fields
PROBLEM By default, IntelliJ IDEA generates mutable classes and fields. One of the steps to achieve immutability is to make all classes and fields to be final. SOLUTION Making Fields Final Go to Preferences… -> Code Style -> Java -> Code Generation tab Under Final Modifier, check both Make generated local variables final and Make… Read More…
-
Maven: Deploying Generated Site to GitHub
INTRO GitHub provides an incredible feature that allows us to easily push Maven generated site to our project’s GitHub repository. Here’s how to do it… STEP 1: Define GitHub credential Go to ~/.m2/settings.xml and add your GitHub username and password:- STEP 2: Define GitHub’s site-maven-plugin GitHub provides its own site-maven-plugin that can be used to… Read More…
-
IntelliJ : Karma Integration
Overview Although we can run karma start karma.conf.js on the command line to start Karma test runner, JetBrains provides a great Karma-IntelliJ integration to run and display the JavaScript test results within IntelliJ. Prerequisites Install Karma Plugin in IntelliJ The first step is to install the Karma plugin created by JetBrains. Create Karma “Run” Configuration… Read More…