Skip to content

Commit 618c9c5

Browse files
committed
Fix local Maven repo path by overwriting in MavenProjectParser
1 parent 9d95209 commit 618c9c5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

components/sbm-core/src/main/java/org/springframework/sbm/project/parser/MavenProjectParser.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,10 @@ public List<SourceFile> parse(Path projectDirectory, List<Resource> resources) {
7373
projectMetadata.setMavenSettings(mavenSettings);
7474
MavenExecutionContextView mavenExecutionContext = MavenExecutionContextView.view(executionContext);
7575
mavenExecutionContext.setMavenSettings(mavenSettings);
76-
77-
76+
// if(mavenExecutionContext.getLocalRepository() == null) {
77+
MavenExecutionContextView.view(executionContext).setLocalRepository(new MavenRepository("local", "file://" + Path.of(System.getProperty("user.home")).resolve(".m2/repository"), null, null, false, null, null, null));
78+
// }
79+
// default local repo provided by MavenExecutionContextView misses two '/' in the path
7880
mavenConfigHandler.injectMavenConfigIntoSystemProperties(resources);
7981

8082
@Nullable BuildEnvironment buildEnvironment = null;

0 commit comments

Comments
 (0)