Giter Site home page Giter Site logo

asdf-maven's People

Contributors

adamcohen avatar cehoffman avatar chris-v avatar halcyon avatar jfly avatar mattnelson avatar mrqubo avatar redgarb avatar rg-p avatar sboardwell avatar skotchpine avatar unicolet avatar whaley avatar whitfin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

asdf-maven's Issues

JAVA_HOME not found when .tool-versions has multiple versions

Summary

I'm encountering the same issue described in JAVA_HOME not found from the skotchpine/asdf-maven repo. It looks like halcyon/asdf-maven was forked from the skotchpine/asdf-maven repo in order to fix this exact issue, which it did in Fix missing JAVA_HOME. Unfortunately, another commit was made in Simplify setting JAVA_HOME which reintroduces the bug and prevents JAVA_HOME from being set correctly when the .tool-versions file has multiple versions for a single tool:

$ mvn -version

The JAVA_HOME environment variable is not defined correctly
This environment variable is needed to run this program
NB: JAVA_HOME should point to a JDK not a JRE

Steps to reproduce

If the .tool-versions file contains multiple versions for a single tool, for example:

java adopt-openjdk-11.0.7+10 adopt-openjdk-8u252-b09
maven 3.6.3

Then asdf where java used in asdf-maven/bin/exec-env returns the following error:

$ asdf where java
Version not installed

This prevents JAVA_HOME from being set correctly and causes mvn to return the following error:

$ mvn -version

The JAVA_HOME environment variable is not defined correctly
This environment variable is needed to run this program
NB: JAVA_HOME should point to a JDK not a JRE

If the .tool-versions file contains a single version for a tool, for example:

java adopt-openjdk-11.0.7+10
maven 3.6.3

Then asdf where java works as expected, and so does mvn -version:

$ asdf where java
/opt/asdf/installs/java/adopt-openjdk-11.0.7+10

$ mvn -version
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /opt/asdf/installs/maven/3.6.3
Java version: 11.0.7, vendor: AdoptOpenJDK, runtime: /opt/asdf/installs/java/adopt-openjdk-11.0.7+10
Default locale: en_US, platform encoding: ANSI_X3.4-1968
OS name: "linux", version: "4.19.76-linuxkit", arch: "amd64", family: "unix"

Possible fixes

or

asdf latest maven not working as expected

> asdf latest maven # expecting latest stable version (`3.8.6` at time of writing)
4.0.0-alpha-2
> asdf latest maven 3 # expecting a version starting with "3"
4.0.0-alpha-2

This is also impacting asdf install maven latest.

Invalid interpreter in list-all

When I try running asdf list all maven it results in

/opt/homebrew/Cellar/asdf/0.9.0/libexec/lib/commands/command-list-all.bash: /Users/username/.asdf/plugins/maven/bin/list-all: /bin/env: Defekter Interpreter: No such file or directory

At least on MacOS env seems to be located in /usr/bin/env now. It also looks like the same script for the Java plugin already uses that path. A quick test changing it was also successful.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.