There may be an export that you are not aware of.
Check all places where environment variables are defined, for example
/etc/environment ~/.bashrc ~/.mavenrc
In my case .mavenrc pointing to my old maven house, I deleted it and everything worked as expected (my new installation approved it instead of .bashrc).
source share