Compare commits

..

2 Commits

Author SHA1 Message Date
d88e0e4dd5 Bump version 2025-02-24 18:46:06 +01:00
18c36eb4de Help pepole debug when mvn build fails 2025-02-24 18:06:28 +01:00
2 changed files with 32 additions and 24 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "keycloakify", "name": "keycloakify",
"version": "11.8.15", "version": "11.8.16",
"description": "Framework to create custom Keycloak UIs", "description": "Framework to create custom Keycloak UIs",
"repository": { "repository": {
"type": "git", "type": "git",

View File

@ -220,13 +220,17 @@ export async function buildJar(params: {
); );
} }
{
const mvnBuildCmd = `mvn clean install -Dmaven.repo.local="${pathJoin(keycloakifyBuildCacheDirPath, ".m2")}"`;
await new Promise<void>((resolve, reject) => await new Promise<void>((resolve, reject) =>
child_process.exec( child_process.exec(
`mvn clean install -Dmaven.repo.local="${pathJoin(keycloakifyBuildCacheDirPath, ".m2")}"`, mvnBuildCmd,
{ cwd: keycloakifyBuildCacheDirPath }, { cwd: keycloakifyBuildCacheDirPath },
error => { error => {
if (error !== null) { if (error !== null) {
console.error( console.error(
[
`Build jar failed: ${JSON.stringify( `Build jar failed: ${JSON.stringify(
{ {
jarFileBasename, jarFileBasename,
@ -235,7 +239,10 @@ export async function buildJar(params: {
}, },
null, null,
2 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); reject(error);
@ -245,6 +252,7 @@ export async function buildJar(params: {
} }
) )
); );
}
await fs.rename( await fs.rename(
pathJoin( pathJoin(