Skip to content

Commit

Permalink
fix(maven): Use documented default value for relativePath (#4182)
Browse files Browse the repository at this point in the history
fix(maven): Use documented default value for `relativePath`
  • Loading branch information
zharinov authored and rarkins committed Jul 25, 2019
1 parent 519b49e commit 3d36f28
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/manager/maven/extract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,9 @@ export function extractPackage(rawContent: string, packageFile: string = null) {
});
}

const parentPath = project.valueWithPath('parent.relativePath');
if (parentPath) {
if (packageFile && project.childNamed('parent')) {
const parentPath =
project.valueWithPath('parent.relativePath') || '../pom.xml';
result.parent = resolveParentFile(packageFile, parentPath);
}

Expand Down
1 change: 1 addition & 0 deletions test/manager/maven/__snapshots__/index.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ Array [
},
],
"packageFile": "random.pom.xml",
"parent": "../pom.xml",
},
]
`;

0 comments on commit 3d36f28

Please sign in to comment.