Skip to content

Commit

Permalink
feat(executors): add NX_SKIP_MAVEN_WRAPPER environment variable (#501)
Browse files Browse the repository at this point in the history
Co-authored-by: khalilou88 <[email protected]>
  • Loading branch information
khalilou88 and khalilou88 authored Oct 6, 2023
1 parent 1730444 commit 516a569
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions packages/nx-maven/src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,17 @@ import { readXml } from '@jnxplus/xml';
export function getExecutable() {
let executable = '';

const isWrapperExists = isWrapperExistsFunction();

if (isWrapperExists) {
const isWin = process.platform === 'win32';
executable = isWin ? 'mvnw.cmd' : './mvnw';
} else {
if (process.env['NX_SKIP_MAVEN_WRAPPER'] === 'true') {
executable = 'mvn';
} else {
const isWrapperExists = isWrapperExistsFunction();

if (isWrapperExists) {
const isWin = process.platform === 'win32';
executable = isWin ? 'mvnw.cmd' : './mvnw';
} else {
executable = 'mvn';
}
}

if (process.env['NX_MAVEN_CLI_OPTS']) {
Expand Down

0 comments on commit 516a569

Please sign in to comment.