'MVN is expecting an older version of ASDF
When I try to run mvn validate, I get the following error.
/Users/syncmaster/.asdf/shims/mvn: line 3: /usr/local/Cellar/asdf/0.9.0/libexec/bin/asdf: No such file or directory
/Users/syncmaster/.asdf/shims/mvn: line 3: exec: /usr/local/Cellar/asdf/0.9.0/libexec/bin/asdf: cannot execute: No such file or directory
However here is the details of my asdf
ASDF Version
$asdf --version
v0.10.1
$whereis asdf
asdf: /usr/local/opt/asdf/libexec/bin/asdf
$ls /usr/local/Cellar/asdf
0.10.1
From brew:
brew info asdf
asdf: stable 0.10.1 (bottled), HEAD
Extendable version manager with support for Ruby, Node.js, Erlang & more
https://asdf-vm.com/
/usr/local/Cellar/asdf/0.10.1 (168 files, 714.3KB) *
Poured from bottle on 2022-05-19 at 10:42:28
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/asdf.rb
My .zshrc has the following line.
. /usr/local/opt/asdf/libexec/asdf.sh
How can I fix my ASDF version so that maven uses the correct one?
Solution 1:[1]
I fixed this by reinstalling maven using asdf.
Here is why I need ASDF for my Maven installation - I need Maven 3.6.3 and homebrew only supports 3.5 and 3.8. Instead of installing Maven manually, I prefer using ASDF to take care of the installation.
Uninstalled Maven first
asdf uninstall maven 3.6.3
asdf plugin remove maven
Reinstalled Maven
asdf list all maven 3.6
asdf install maven 3.6.3
asdf global maven 3.6.3
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | SyncMaster |
