diff --git a/packages/nx-gradle/src/generators/init/generator.ts b/packages/nx-gradle/src/generators/init/generator.ts index aa1a81651..190564208 100644 --- a/packages/nx-gradle/src/generators/init/generator.ts +++ b/packages/nx-gradle/src/generators/init/generator.ts @@ -20,6 +20,7 @@ import { addProjectConfiguration, formatFiles, generateFiles, + installPackagesTask, joinPathFragments, logger, offsetFromRoot, @@ -146,6 +147,10 @@ export async function initGenerator( if (!options.skipFormat) { await formatFiles(tree); } + + return () => { + installPackagesTask(tree); + }; } function updateNxJson(tree: Tree, options: NormalizedSchema) { diff --git a/packages/nx-maven/src/generators/init/generator.ts b/packages/nx-maven/src/generators/init/generator.ts index 3a574c012..846a6f3d7 100644 --- a/packages/nx-maven/src/generators/init/generator.ts +++ b/packages/nx-maven/src/generators/init/generator.ts @@ -16,6 +16,7 @@ import { addProjectConfiguration, formatFiles, generateFiles, + installPackagesTask, joinPathFragments, logger, offsetFromRoot, @@ -122,6 +123,10 @@ export async function initGenerator( if (!options.skipFormat) { await formatFiles(tree); } + + return () => { + installPackagesTask(tree); + }; } function updateNxJson(tree: Tree, options: NormalizedSchema) { diff --git a/testing-projects/jnxplus-smoke/tests/nx-maven/quarkus.spec.ts b/testing-projects/jnxplus-smoke/tests/nx-maven/quarkus.spec.ts index 32ae85156..8c92be961 100644 --- a/testing-projects/jnxplus-smoke/tests/nx-maven/quarkus.spec.ts +++ b/testing-projects/jnxplus-smoke/tests/nx-maven/quarkus.spec.ts @@ -117,6 +117,8 @@ describe('nx-maven quarkus smoke', () => { execSyncOptions(), ); + execSync(`npx nx format --projects ${testLib}`, execSyncOptions()); + execSync(`npx nx test ${testLib}`, execSyncOptions()); execSync(`npx nx run-many --target=build --parallel`, execSyncOptions());