Skip to content

Commit

Permalink
chore: log maven build mode (concurrent or serial)
Browse files Browse the repository at this point in the history
  • Loading branch information
vvagaytsev committed Jun 22, 2023
1 parent 8d89f6f commit bf75795
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plugins/jib/maven.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,10 @@ export async function mvn({
log.debug(`Execing ${mvnPath} ${args.join(" ")}`)
const params = { binaryPath: mvnPath, args, cwd, openJdkPath, outputStream }
if (concurrentMavenBuilds) {
log.verbose(`Concurrent maven builds are enabled.`)
return runBuildTool(params)
} else {
log.verbose(`Concurrent maven builds are disabled.`)
// Maven has issues when running concurrent processes, so we're working around that with a lock.
// TODO: http://takari.io/book/30-team-maven.html would be a more robust solution.
return buildLock.acquire("mvn", async () => {
Expand Down
2 changes: 2 additions & 0 deletions plugins/jib/mavend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,10 @@ export async function mvnd({
log.debug(`Execing ${mvndPath} ${args.join(" ")}`)
const params = { binaryPath: mvndPath, args, cwd, openJdkPath, outputStream }
if (concurrentMavenBuilds) {
log.verbose(`Concurrent maven builds are enabled.`)
return runBuildTool(params)
} else {
log.verbose(`Concurrent maven builds are disabled.`)
return buildLock.acquire("mvnd", async () => {
return runBuildTool(params)
})
Expand Down

0 comments on commit bf75795

Please sign in to comment.