Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Searching for the Maven executable in a portable way. #45

Closed
khmarbaise opened this issue Apr 19, 2020 · 0 comments
Closed

Searching for the Maven executable in a portable way. #45

khmarbaise opened this issue Apr 19, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@khmarbaise
Copy link
Owner

khmarbaise commented Apr 19, 2020

Currently I'm using the following code

    String mavenHome = System.getProperty("maven.home");
    if (mavenHome == null || mavenHome.isEmpty()) {
      //FIXME: currently not set; using hard coded path? Need to reconsider how to set it?
      mavenHome = "/Users/khmarbaise/tools/maven";
    }
    String mvnLocation = mavenHome + "/bin/mvn";
    if (OS.WINDOWS.isCurrentOs()) {
      mvnLocation += ".cmd";
    }

The obvious thing here is of course that I use a hard coded path of my own machine which has to be removed and replaced with a search via PATH. Furthermore the mvnLocation should be checked via the PATH.

@khmarbaise khmarbaise added the enhancement New feature or request label Apr 19, 2020
@khmarbaise khmarbaise added this to the 0.4.0 milestone Apr 19, 2020
@khmarbaise khmarbaise self-assigned this Apr 19, 2020
@khmarbaise khmarbaise changed the title Searching for the Maven executable Searching for the Maven executable in a portable way. Apr 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant