halcyon / asdf-java

A Java plugin for asdf-vm.
MIT License
468 stars 87 forks source link

Add legacy filename support for jenv #32

Closed carhartl closed 5 years ago

carhartl commented 5 years ago

So far I've been using jenv along with .java-version files, this would allow for migrating to asdf.

halcyon commented 5 years ago

@carhartl Thank you. I'm not familiar with jenv, but I'll become familiar with it and likely merge this within the next few days.

carhartl commented 5 years ago

Thanks!

=> http://www.jenv.be/

halcyon commented 5 years ago

I apologize for the delay - Thanksgiving holidays took more time from my schedule than I had anticipated. I've looked over both jenv and your changes and I don't quite understand the use case. Could you describe how you would use this in your workflow?

carhartl commented 5 years ago

Thanks, and no need to apologize! The use case is as follows: in my team we‘re using jenv to ensure a consistent environment (java version) for everyone, and thus each service/project has such a .java-version file. I‘ve migrated to asdf but I don‘t want to impose migrating on everyone else, and I also want to avoid maintaining an additional .tool-versions file just for me. Does that makes sense?

carhartl commented 5 years ago

Or did I overlook something?

halcyon commented 5 years ago

That sounds great. I wasn't able to find any documentation relating to the legacy filename feature in asdf-vm's docs. The best I could find was some mention of this feature in a few plugins (ruby and elixir). Their implementations were very similar to your own. I wanted to understand it better so I'd be able to support it. Your explanation was very helpful. Thanks again!

carhartl commented 5 years ago

I found a bit of explanation in the docs here: https://asdf-vm.com/#/core-configuration?id=homeasdfrc — but I also didn’t find it on my first attempt :)

Since I was so used to it from a variety of version managers (nodenv, rbenv, pyenv, ...) I forgot that not everyone might be, and missed to provide a better PR description.

Great that it is merged now, my migration to asdf is complete 🎉