diff --git a/lib/manager/maven/extract.ts b/lib/manager/maven/extract.ts index 65d10b3899036a..bf535024ef3f3f 100644 --- a/lib/manager/maven/extract.ts +++ b/lib/manager/maven/extract.ts @@ -179,9 +179,8 @@ export function extractPackage(rawContent: string, packageFile: string = null) { }); } - if (packageFile && project.childNamed('parent')) { - const parentPath = - project.valueWithPath('parent.relativePath') || '../pom.xml'; + const parentPath = project.valueWithPath('parent.relativePath'); + if (parentPath) { result.parent = resolveParentFile(packageFile, parentPath); } diff --git a/test/manager/maven/__snapshots__/index.spec.ts.snap b/test/manager/maven/__snapshots__/index.spec.ts.snap index 0c5c78c660ec92..c9dc7c46550160 100644 --- a/test/manager/maven/__snapshots__/index.spec.ts.snap +++ b/test/manager/maven/__snapshots__/index.spec.ts.snap @@ -143,7 +143,6 @@ Array [ }, ], "packageFile": "random.pom.xml", - "parent": "../pom.xml", }, ] `;