-
Notifications
You must be signed in to change notification settings - Fork 205
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
can't use system environment variable? #693
Comments
Environment properties are supported using an
|
yeah, can't read system env. but you can use that: // org.mvndaemon.mvnd.client.DaemonParameters#javaHome
public Path javaHome() {
final Path result = value(Environment.JAVA_HOME)
.orLocalProperty(provider, suppliedPropertiesPath())
.orLocalProperty(provider, localPropertiesPath())
.orLocalProperty(provider, userPropertiesPath())
.orLocalProperty(provider, globalPropertiesPath())
.orSystemProperty()
.orEnvironmentVariable()
.or(new ValueSource(
description -> description.append("java command"), DaemonParameters::javaHomeFromPath))
.orFail()
.cache(provider)
.asPath();
try {
return result.toRealPath();
} catch (IOException e) {
throw new RuntimeException("Could not get a real path from path " + result);
}
} remove config file , use SystemProperty : |
Closed
gnodet
added a commit
to gnodet/mvnd
that referenced
this issue
Jul 3, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
execute
![image](https://user-images.githubusercontent.com/23392657/191907149-8459df31-e109-4ff9-9662-d3049f483a1c.png)
mvnd clean
mvnd -version
,tip me 'Could not get a real path from path $JAVA_HOME'The text was updated successfully, but these errors were encountered: