ide
ide copied to clipboard
Intellij default maven settings use $USER_HOME instead of project
Expected behavior
As a devon intellij user, I want to benefit from my isolated installation so that dependencies and configurations get taken from my project.
Actual behavior
Currently intelliJ uses the $USER_HOME/.m2 folder by default. This can result in errors and security risks for projects which should not use the shared library. You can also see that intelliJ is using the bundled maven by default too.
As seen here:
Steps to reproduce (bug) / Use Case of feature request (enhancement)
- Run devon intellij
- Check Settings/Build Execution Deployment/Maven/Local Repository (points to the $USER_HOME)
Comments/Hints:
We should add the project home directory to the initial settings of intelliJ as well as change the bundled maven to our devonfw-ide specific maven.
Affected version:
- devonfw-ide: 2023.04.001
It seems I have found a solution. However, you therefore need to always open the workspace folder itself (E.g. workspaces/main
) as your project. Still needs some testing...
Is this fixed already? @jan-vcapgemini just added PR #1306 - together with my change this should solve the problem. Further PR https://github.com/devonfw/ide-settings/pull/34 has been merged that also fixes several related aspects.
@jan-vcapgemini also found another new config in .intellij/config/options/
that solves the problem for new projects that we should also add to ide-settings
. IMHO this is the last thing we need to do and then we can close this issue as fixed.