diff --git a/sbm-support-rewrite/src/main/java/org/springframework/sbm/parsers/RewriteProjectParser.java b/sbm-support-rewrite/src/main/java/org/springframework/sbm/parsers/RewriteProjectParser.java index 60470421f..6b2d1694f 100644 --- a/sbm-support-rewrite/src/main/java/org/springframework/sbm/parsers/RewriteProjectParser.java +++ b/sbm-support-rewrite/src/main/java/org/springframework/sbm/parsers/RewriteProjectParser.java @@ -24,7 +24,9 @@ import org.openrewrite.SourceFile; import org.openrewrite.marker.Marker; import org.openrewrite.maven.AbstractRewriteMojo; +import org.openrewrite.maven.MavenExecutionContextView; import org.openrewrite.maven.MavenMojoProjectParser; +import org.openrewrite.maven.tree.MavenRepository; import org.openrewrite.style.NamedStyles; import org.openrewrite.tree.ParsingEventListener; import org.openrewrite.tree.ParsingExecutionContextView; @@ -84,7 +86,7 @@ public RewriteProjectParsingResult parse(Path baseDir, List resources, if(!baseDir.isAbsolute()) { baseDir = baseDir.toAbsolutePath().normalize(); } - + MavenExecutionContextView.view(executionContext).setLocalRepository(new MavenRepository("local", "file://" + Path.of(System.getProperty("user.home")).resolve(".m2/repository"), null, null, false, null, null, null)); eventPublisher.publishEvent(new StartedParsingProjectEvent(resources)); ParsingExecutionContextView.view(executionContext).setParsingListener(parsingEventListener);