Commit 0a9b603
committed
Set maven.multiModuleProjectDirectory as system property
The Maven CLI launcher sets maven.multiModuleProjectDirectory as a JVM
system property (-D) pointing to the directory containing .mvn/. JDTLS
computes this value and injects it as a Maven profile property, but
m2e's MavenExecutionContext.populateSystemProperties() reads from
System.getProperties(), not from profile properties.
This means in POMs remains
unresolved during model building, breaking projects like Apache Dubbo
and Google Guava that use it in resource directory paths.
Set the property via System.setProperty() to mirror the mvn launcher
behavior. This is only done when the property isn't already set
externally.
Fixes #3760
Signed-off-by: Changyong Gong <chagon@microsoft.com>1 parent 7be965c commit 0a9b603
1 file changed
Lines changed: 7 additions & 0 deletions
File tree
- org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/preferences
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
146 | 153 | | |
147 | 154 | | |
148 | 155 | | |
| |||
0 commit comments