You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As an IDEasy user I expect IDEasy to help me fix issues with my Java configuration.
Actual behavior
If I deliberately use a faulty Java configuration e.g. set my JAVA_HOME to a non existent directory, IDEasy will just report an error like this:
$ ide mvn
The JAVA_HOME environment variable is not defined correctly,
this environment variable is needed to run this program.
Running command 'D:\Projects\ideasy-dev\software\mvn\bin\mvn.cmd'
failed with exit code 1!
Step 'ide (mvn)' failed: com.devonfw.tools.ide.cli.CliProcessException: Running command 'D:\Projects\ideasy-dev\software\mvn\bin\mvn.cmd'
failed with exit code 1!
1 step(s) failed out of 3 steps.
Running command 'D:\Projects\ideasy-dev\software\mvn\bin\mvn.cmd'
failed with exit code 1!
Error: IDEasy failed with exit code 1
Instead if would be better if IDEasy can repair itself or point the user in the right direction to fix this problem.
Steps to reproduce (bug) / Use Case of feature request (enhancement)
Open a mvn project within an IDEasy project e.g. switch the directory to projects/IDEasy/workspaces/main/IDEasy
Type: export JAVA_HOME="C:/Test"
Try to run ide mvn
Related/Dependent Issues
Comments/Hints:
It would for example be helpful, if IDEasy would print out where the JAVA_HOME variable is pointing to.
Affected version:
OS: Windows
IDEasy: 2024.12.001-beta
The text was updated successfully, but these errors were encountered:
First of all I think that it is not IDEasy but maven that cannot handle a faulty definition of JAVA_HOME.
What we could do in IDEasy is to expose our environment variables from ToolCommandlet.setEnvironment also to the shell.
That means the following:
We will improve EnvironmentCommandlet
It will iterate all LocalToolCommandlets for installed tools (see UpdateCommandlet.updateSoftware() to get the idea)
For each ToolCommandlet we will call setEnvironment and pass the same instance of EnvironmentContext that collects the environment variables to a Map<String, String> (or Properties).
At the end of the loop, we add all these collected variables that are not already defined to the output.
Expected behavior
As an IDEasy user I expect IDEasy to help me fix issues with my Java configuration.
Actual behavior
If I deliberately use a faulty Java configuration e.g. set my JAVA_HOME to a non existent directory, IDEasy will just report an error like this:
Instead if would be better if IDEasy can repair itself or point the user in the right direction to fix this problem.
Steps to reproduce (bug) / Use Case of feature request (enhancement)
export JAVA_HOME="C:/Test"
ide mvn
Related/Dependent Issues
Comments/Hints:
It would for example be helpful, if IDEasy would print out where the JAVA_HOME variable is pointing to.
Affected version:
The text was updated successfully, but these errors were encountered: