Help pepole debug when mvn build fails
This commit is contained in:
parent
80aeabad51
commit
18c36eb4de
@ -220,31 +220,39 @@ export async function buildJar(params: {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
await new Promise<void>((resolve, reject) =>
|
{
|
||||||
child_process.exec(
|
const mvnBuildCmd = `mvn clean install -Dmaven.repo.local="${pathJoin(keycloakifyBuildCacheDirPath, ".m2")}"`;
|
||||||
`mvn clean install -Dmaven.repo.local="${pathJoin(keycloakifyBuildCacheDirPath, ".m2")}"`,
|
|
||||||
{ cwd: keycloakifyBuildCacheDirPath },
|
|
||||||
error => {
|
|
||||||
if (error !== null) {
|
|
||||||
console.error(
|
|
||||||
`Build jar failed: ${JSON.stringify(
|
|
||||||
{
|
|
||||||
jarFileBasename,
|
|
||||||
keycloakAccountV1Version,
|
|
||||||
keycloakThemeAdditionalInfoExtensionVersion
|
|
||||||
},
|
|
||||||
null,
|
|
||||||
2
|
|
||||||
)}`
|
|
||||||
);
|
|
||||||
|
|
||||||
reject(error);
|
await new Promise<void>((resolve, reject) =>
|
||||||
return;
|
child_process.exec(
|
||||||
|
mvnBuildCmd,
|
||||||
|
{ cwd: keycloakifyBuildCacheDirPath },
|
||||||
|
error => {
|
||||||
|
if (error !== null) {
|
||||||
|
console.error(
|
||||||
|
[
|
||||||
|
`Build jar failed: ${JSON.stringify(
|
||||||
|
{
|
||||||
|
jarFileBasename,
|
||||||
|
keycloakAccountV1Version,
|
||||||
|
keycloakThemeAdditionalInfoExtensionVersion
|
||||||
|
},
|
||||||
|
null,
|
||||||
|
2
|
||||||
|
)}`,
|
||||||
|
"Try running the following command to debug the issue (you are probably under a restricted network and you need to configure your proxy):",
|
||||||
|
`cd ${keycloakifyBuildCacheDirPath} && ${mvnBuildCmd}`
|
||||||
|
].join("\n")
|
||||||
|
);
|
||||||
|
|
||||||
|
reject(error);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
resolve();
|
||||||
}
|
}
|
||||||
resolve();
|
)
|
||||||
}
|
);
|
||||||
)
|
}
|
||||||
);
|
|
||||||
|
|
||||||
await fs.rename(
|
await fs.rename(
|
||||||
pathJoin(
|
pathJoin(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user