I ran this command in my project directory to build and package it:
mvn clean javadoc:jar package
I do have my JAVA_HOME varia
JAVA_HOME
You can add the JAVA_HOME as an environment variable in eclipse.
Go to your maven build-> add the following.
Click New->
Name: JAVA_HOME
Value : your path here.
This worked for me!