ide icon indicating copy to clipboard operation
ide copied to clipboard

Intellij default maven settings use $USER_HOME instead of project

Open jan-vcapgemini opened this issue 1 year ago • 2 comments

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:

Image

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

  1. Run devon intellij
  2. 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.

image

Affected version:

  • devonfw-ide: 2023.04.001

jan-vcapgemini avatar May 09 '23 14:05 jan-vcapgemini

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...

hohwille avatar Aug 01 '23 15:08 hohwille

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.

hohwille avatar Aug 04 '23 17:08 hohwille