Sonarcube – Maven and Docker analysis

SonarLint is one tool I gravitate towards – inline analysis of my code in Eclipse.  I have finally broken down and investigated using Sonarcube with maven – the heavy weight tool for evaluating code.  It’s exciting. You need to pull your sonarqube docker. You can find more details at :~/my-repo$ docker pull sonarqube Using […]

EAR Projects Generated for JavaEE Import

Importing my project into Eclipse, I found so many additional EAR projects were being generated. To stop this feature, I went to Eclipse > Preference > Maven > Java EE Integration and unchecked Enable Java EE Configuration. I removed the cached EAR projects (deleting from disk) and removed the regular projects, and imported again.  Voila…. […]

Maven Surefire runs out of memory

I’m running a complicated integration test, and needed to allocate memory appropriately – MAVEN_OPTS was used to increase memory, and I still ran into an issue with MAVEN out-of-memory.  To fix the issue, I had to use the Surefire argsline:  <plugins>   <plugin>      <groupId>org.apache.maven.plugins</groupId>      <artifactId>maven-surefire-plugin</artifactId>      <configuration>         <argLine>-Xms2G -Xmx2G</argLine>      </configuration>   </plugin></plugins>

License Management via Maven Plugin

Keeping a license current is luckily addressed by the mycila license maven plugin. This plugin scans the project files in src files and updates the files with the license.txt format. To configure the plguin refer to To check the current status of the copyrights and see what needs to be updated: mvn com.mycila:license-maven-plugin:check -f […]

Maven Repository – Go Offline with dependencies

Maven Repository My team uses the pom.xml to generate a repository which is handed off to the secondary developers. For instance, I have a custom db2 jar ## Update your localRepository – Start a Shell – cd ~/.m2 – vim settings.xml – add `<localRepository>/Users/userid/git/client-app/documentation/repo/local_repo</localRepository>` Note: the path is relative to the location of my repo […]

Maven Animal Sniffer Plugin

For the past few years, most of my personal and professional projects are built using Maven.  The dependency management and corresponding build lifecycle enable me to do some complex builds (for instance HBase 1.2.5 Client Jars). Command mvn dependency:tree -f demo-app/pom.xml Result [INFO] [INFO] +- junit:junit:jar:4.12:test [INFO] | \- org.hamcrest:hamcrest-core:jar:1.3:test [INFO] \- org.apache.hbase:hbase:pom:1.2.5:compile [INFO] […]

Generating Swagger as part of a Maven Build

Most of my projects use Maven to build and coordinate dependencies and run unit and build integration tests. I’ve found it a real pain that I could not generate my swagger docs as part of the build. I have found a really easy way. In Jenkins, I have a downstream job that runs specific maven […]