Skip to content

Commit 2088eaa

Browse files
authored
fix(maven): skip maven plugin computation on vercel/netlify (#33486)
<!-- Please make sure you have read the submission guidelines before posting an PR --> <!-- https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr --> <!-- Please make sure that your commit message follows our format --> <!-- Example: `fix(nx): must begin with lowercase` --> <!-- If this is a particularly complex change or feature addition, you can request a dedicated Nx release for this pull request branch. Mention someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they will confirm if the PR warrants its own release for testing purposes, and generate it for you if appropriate. --> ## Current Behavior <!-- This is the behavior we have today --> ## Expected Behavior <!-- This is the behavior we should expect with the changes in this PR --> ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes #
1 parent 001e2ba commit 2088eaa

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

packages/maven/src/plugins/nodes.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,22 @@ export const createNodes: CreateNodesV2<MavenPluginOptions> = [
3636
return [];
3737
}
3838

39+
// Vercel does not allow JAVA_VERSION to be set, skip on Vercel
40+
if (process.env.VERCEL) {
41+
console.error(
42+
`VERCEL environment detected, skipping maven plugin computation.`
43+
);
44+
return [];
45+
}
46+
47+
// Netlify only supports Java 8, skip on Netlify
48+
if (process.env.NETLIFY) {
49+
console.error(
50+
`NETLIFY environment detected, skipping maven plugin computation.`
51+
);
52+
return [];
53+
}
54+
3955
// Get cache path based on options
4056
const optionsHash = hashObject(opts);
4157
const cachePath = getCachePath(context.workspaceRoot, optionsHash);

0 commit comments

Comments
 (0)