fix(maven): Use documented default value for relativePath (#4182)

fix(maven): Use documented default value for `relativePath`
This commit is contained in:
Sergio Zharinov 2019-07-25 23:29:50 +04:00 committed by Rhys Arkins
parent 519b49eaa9
commit 3d36f28875
2 changed files with 4 additions and 2 deletions

View file

@ -179,8 +179,9 @@ export function extractPackage(rawContent: string, packageFile: string = null) {
}); });
} }
const parentPath = project.valueWithPath('parent.relativePath'); if (packageFile && project.childNamed('parent')) {
if (parentPath) { const parentPath =
project.valueWithPath('parent.relativePath') || '../pom.xml';
result.parent = resolveParentFile(packageFile, parentPath); result.parent = resolveParentFile(packageFile, parentPath);
} }

View file

@ -143,6 +143,7 @@ Array [
}, },
], ],
"packageFile": "random.pom.xml", "packageFile": "random.pom.xml",
"parent": "../pom.xml",
}, },
] ]
`; `;