Skip to content

Commit 03e1c21

Browse files
Changing the parsing of the relativePath for parent in the MavenPomDownloader to prevent the situation where / was producing /\pom.xml on Windows rather than \pom.xml (#6506)
1 parent 18ef447 commit 03e1c21

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

rewrite-maven/src/main/java/org/openrewrite/maven/internal/MavenPomDownloader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ public Pom download(GroupArtifactVersion gav,
520520
!StringUtils.isBlank(relativePath) && !relativePath.contains(":")) {
521521
Path folderContainingPom = containingPom.getRequested().getSourcePath().getParent();
522522
if (folderContainingPom != null) {
523-
Pom maybeLocalPom = projectPoms.get(folderContainingPom.resolve(Paths.get(relativePath, "pom.xml"))
523+
Pom maybeLocalPom = projectPoms.get(folderContainingPom.resolve(Paths.get(relativePath).resolve("pom.xml"))
524524
.normalize());
525525
// Even poms published to remote repositories still contain relative paths to their parent poms
526526
// So double check that the GAV coordinates match so that we don't get a relative path from a remote

0 commit comments

Comments
 (0)