Maven error in OS X: “Maven already installed, it’s just not linked”

If you use Homebrew on OS X and you come across the error below, just:

  1. $ rm -rf /usr/local/Cellar/maven
  2. $ brew install maven
  3. $ mvn -version
  4. That’s it!

$ brew install maven
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 2 taps (caskroom/cask, caskroom/versions).

Warning: maven-3.5.0 already installed, it's just not linked.

Maven build error: “Caused by: Incompatible version 1007”

I was encountering this error in Jenkins when it tried to build a project I was working on:

Caused by: Incompatible version 1007.
at org.sonar.plugins.jacoco.AbstractAnalyzer.readExecutionData(
at org.sonar.plugins.jacoco.AbstractAnalyzer.analyse(

The problem was due to a breakage/bug in the jacoco-maven-plugin. To fix, simply add a version in your pom.xml, like so:


That’s it!