From e9e8e1c6b84757b3c75bc7b88a5418022216eb5d Mon Sep 17 00:00:00 2001 From: Tine Kondo Date: Fri, 23 Feb 2024 15:41:52 +0000 Subject: [PATCH] fix: do not generate `targets` at parent module level and lets Nx manage dependencies entirely BREAKING CHANGE: `project.json` of parent module no longer contain `targets` This caused conflicts, when for e.g , running a task `build` from the parent module. `Maven`/`Gradle` would trigger the build on child modules, when Nx already did using project graph. --- .../generators/project/lib/generate-project-configuration.ts | 2 +- .../generators/project/lib/generate-project-configuration.ts | 2 +- .../generators/project/lib/generate-project-configuration.ts | 2 +- .../generators/project/lib/generate-project-configuration.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/nx-ktor/src/generators/project/lib/generate-project-configuration.ts b/packages/nx-ktor/src/generators/project/lib/generate-project-configuration.ts index dcdd6e9f..1df16fac 100644 --- a/packages/nx-ktor/src/generators/project/lib/generate-project-configuration.ts +++ b/packages/nx-ktor/src/generators/project/lib/generate-project-configuration.ts @@ -71,7 +71,7 @@ export async function generateProjectConfiguration( root: options.moduleRoot, sourceRoot: `${options.moduleRoot}`, projectType: 'application', - targets: getTargets(parentModuleCommands, options.moduleRoot, false), + targets: {}, tags: options.parsedTags, }); } diff --git a/packages/nx-micronaut/src/generators/project/lib/generate-project-configuration.ts b/packages/nx-micronaut/src/generators/project/lib/generate-project-configuration.ts index c72492c1..fc94ce02 100644 --- a/packages/nx-micronaut/src/generators/project/lib/generate-project-configuration.ts +++ b/packages/nx-micronaut/src/generators/project/lib/generate-project-configuration.ts @@ -63,7 +63,7 @@ export async function generateProjectConfiguration( root: options.moduleRoot, sourceRoot: `${options.moduleRoot}`, projectType: 'application', - targets: getTargets(parentModuleCommands, options.moduleRoot, false), + targets: {}, tags: options.parsedTags, }); } diff --git a/packages/nx-quarkus/src/generators/project/lib/generate-project-configuration.ts b/packages/nx-quarkus/src/generators/project/lib/generate-project-configuration.ts index 9f0cc6c2..4f78b436 100644 --- a/packages/nx-quarkus/src/generators/project/lib/generate-project-configuration.ts +++ b/packages/nx-quarkus/src/generators/project/lib/generate-project-configuration.ts @@ -68,7 +68,7 @@ export async function generateProjectConfiguration( root: options.moduleRoot, sourceRoot: `${options.moduleRoot}`, projectType: options.projectType, - targets: getTargets(parentModuleCommands, options.moduleRoot, false), + targets: {}, tags: options.parsedTags, }); } diff --git a/packages/nx-spring-boot/src/generators/project/lib/generate-project-configuration.ts b/packages/nx-spring-boot/src/generators/project/lib/generate-project-configuration.ts index 8d4cc16b..22154820 100644 --- a/packages/nx-spring-boot/src/generators/project/lib/generate-project-configuration.ts +++ b/packages/nx-spring-boot/src/generators/project/lib/generate-project-configuration.ts @@ -63,7 +63,7 @@ export async function generateProjectConfiguration( root: options.moduleRoot, sourceRoot: `${options.moduleRoot}`, projectType: options.projectType, - targets: getTargets(parentModuleCommands, options.moduleRoot, false), + targets: {}, tags: options.parsedTags, }); }