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

ide create still cannot handle faulty JAVA_HOME #1058

Open
hohwille opened this issue Feb 20, 2025 · 0 comments · May be fixed by #1100
Open

ide create still cannot handle faulty JAVA_HOME #1058

hohwille opened this issue Feb 20, 2025 · 0 comments · May be fixed by #1100
Assignees
Labels
bug Something isn't working windows specific for Microsoft Windows OS

Comments

@hohwille
Copy link
Member

Expected behavior

As a IDEasy user, I expect that after #925 is fixed, that I can use IDEasy even with a misconfigured JAVA_HOME in my windows env variables.

Surely not high priority but still something unexpected, if this is not the case.

Actual behavior

$ echo $JAVA_HOME
C:\test
$ ide create testtest -
...
Junction created for C:\projects\testtest\software\mvn <<===>> C:\projects\_ide\software\default\mvn\mvn\3.9.9
Start: Create mvn settings security file at C:\projects\testtest\conf\mvn\settings-security.xml
Running command 'C:\projects\_ide\software\default\mvn\mvn\3.9.9\bin\mvn.cmd' with arguments '--encrypt-master-password' 'zLncaKrTAQKnWZ/jc3Oba4BXUlI='
failed with exit code 1!
The JAVA_HOME environment variable is not defined correctly,
this environment variable is needed to run this program.
Step 'Create mvn settings security file at C:\projects\testtest\conf\mvn\settings-security.xml' ended with failure.
Installation of mvn failed!
java.lang.IllegalStateException: Running command 'C:\projects\_ide\software\default\mvn\mvn\3.9.9\bin\mvn.cmd' with arguments '--encrypt-master-password' 'zLncaKrTAQKnWZ/jc3Oba4BXUlI='
failed with exit code 1!
        at com.devonfw.tools.ide.process.ProcessContextImpl.performLogging(ProcessContextImpl.java:354)
        at com.devonfw.tools.ide.process.ProcessContextImpl.run(ProcessContextImpl.java:195)
        at com.devonfw.tools.ide.tool.mvn.Mvn.createSettingsSecurityFile(Mvn.java:103)
        at com.devonfw.tools.ide.tool.mvn.Mvn.postInstall(Mvn.java:82)
        at com.devonfw.tools.ide.tool.LocalToolCommandlet.postInstall(LocalToolCommandlet.java:123)
        at com.devonfw.tools.ide.tool.plugin.PluginBasedCommandlet.postInstall(PluginBasedCommandlet.java:98)
        at com.devonfw.tools.ide.tool.LocalToolCommandlet.install(LocalToolCommandlet.java:98)
        at com.devonfw.tools.ide.tool.ToolCommandlet.install(ToolCommandlet.java:246)
        at com.devonfw.tools.ide.commandlet.AbstractUpdateCommandlet.updateSoftware(AbstractUpdateCommandlet.java:192)
        at com.devonfw.tools.ide.commandlet.AbstractUpdateCommandlet.run(AbstractUpdateCommandlet.java:63)
        at com.devonfw.tools.ide.commandlet.CreateCommandlet.run(CreateCommandlet.java:64)
        at com.devonfw.tools.ide.context.AbstractIdeContext.applyAndRun(AbstractIdeContext.java:959)
        at com.devonfw.tools.ide.context.AbstractIdeContext.run(AbstractIdeContext.java:877)
        at com.devonfw.tools.ide.cli.Ideasy.runOrThrow(Ideasy.java:95)
        at com.devonfw.tools.ide.cli.Ideasy.run(Ideasy.java:59)
        at com.devonfw.tools.ide.cli.Ideasy.main(Ideasy.java:133)
        at java.base@21.0.2/java.lang.invoke.LambdaForm$DMH/sa346b79c.invokeStaticInit(LambdaForm$DMH)

Steps to reproduce (bug) / Use Case of feature request (enhancement)

  1. misconfigure JAVA_HOME in your windows environment variables
  2. create a new project (ide create projectname -)

Related/Dependent Issues

#925

Comments/Hints:

Nice to have bug issue.

Affected version:

  • OS: Windows
  • 2025.02.001-SNAPSHOT
@hohwille hohwille added bug Something isn't working windows specific for Microsoft Windows OS labels Feb 20, 2025
@github-project-automation github-project-automation bot moved this to 🆕 New in IDEasy board Feb 20, 2025
@jan-vcapgemini jan-vcapgemini self-assigned this Feb 28, 2025
jan-vcapgemini added a commit to jan-vcapgemini/IDEasy that referenced this issue Feb 28, 2025
Fixes: devonfw#1058

### Implements:
* added missing JAVA_HOME to environment variables
@jan-vcapgemini jan-vcapgemini linked a pull request Feb 28, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working windows specific for Microsoft Windows OS
Projects
Status: 🆕 New
Development

Successfully merging a pull request may close this issue.

2 participants