diff --git a/packages/common/src/lib/types/index.ts b/packages/common/src/lib/types/index.ts index aa299a1a8..779d2bc30 100644 --- a/packages/common/src/lib/types/index.ts +++ b/packages/common/src/lib/types/index.ts @@ -12,7 +12,7 @@ export type TargetsType = Record; export type FrameworkType = 'spring-boot' | 'quarkus' | 'micronaut' | 'none'; export type PresetType = 'spring-boot' | 'quarkus' | 'micronaut' | 'none'; export type DependencyManagementType = - | 'bom' + | 'none' | 'spring-boot-parent-pom' | 'micronaut-parent-pom'; export type VersionManagementType = 'properties' | 'version-catalog'; diff --git a/packages/nx-maven/src/generators/init/files/maven/config/pom.xml__template__ b/packages/nx-maven/src/generators/init/files/maven/config/pom.xml__template__ index 7bbbf9456..e3df80599 100644 --- a/packages/nx-maven/src/generators/init/files/maven/config/pom.xml__template__ +++ b/packages/nx-maven/src/generators/init/files/maven/config/pom.xml__template__ @@ -2,9 +2,9 @@ 4.0.0 - <%= groupId %> - <%= parentProjectName %> - <%= parentProjectVersion %> + <%= aggregatorProjectGroupId %> + <%= aggregatorProjectName %> + <%= aggregatorProjectVersion %> pom <% if(dependencyManagement === 'spring-boot-parent-pom') { -%> diff --git a/packages/nx-maven/src/generators/init/generator.ts b/packages/nx-maven/src/generators/init/generator.ts index 60e74fcf6..b62943cf0 100644 --- a/packages/nx-maven/src/generators/init/generator.ts +++ b/packages/nx-maven/src/generators/init/generator.ts @@ -97,7 +97,7 @@ export async function initGenerator( addProjectConfiguration( tree, - normalizedOptions.parentProjectName, + normalizedOptions.aggregatorProjectName, projectConfiguration, ); } diff --git a/packages/nx-maven/src/generators/init/schema.d.ts b/packages/nx-maven/src/generators/init/schema.d.ts index d7f176131..42e88f930 100644 --- a/packages/nx-maven/src/generators/init/schema.d.ts +++ b/packages/nx-maven/src/generators/init/schema.d.ts @@ -2,9 +2,9 @@ import { DependencyManagementType } from '@jnxplus/common'; export interface NxMavenInitGeneratorSchema { javaVersion: string | number; - groupId: string; - parentProjectName: string; - parentProjectVersion: string; + aggregatorProjectGroupId: string; + aggregatorProjectName: string; + aggregatorProjectVersion: string; mavenRootDirectory: string; dependencyManagement: DependencyManagementType; skipWrapper?: boolean; diff --git a/packages/nx-maven/src/generators/init/schema.json b/packages/nx-maven/src/generators/init/schema.json index 3bd5af954..9c84f4b78 100644 --- a/packages/nx-maven/src/generators/init/schema.json +++ b/packages/nx-maven/src/generators/init/schema.json @@ -30,23 +30,25 @@ ] } }, - "groupId": { + "aggregatorProjectGroupId": { "type": "string", "default": "com.example", - "x-prompt": "What groupId would you like to use?" + "description": "GroupId of root aggregator project", + "x-prompt": "What groupId would you like to use for root aggregator project?" }, - "parentProjectName": { + "aggregatorProjectName": { "type": "string", - "default": "root-parent-project", - "x-prompt": "What parentProjectName would you like to use?", + "default": "root-aggregator-project", + "description": "Name of root aggregator project", + "x-prompt": "What name would you like to use for root aggregator project?", "pattern": "^[a-zA-Z].*$" }, - "parentProjectVersion": { + "aggregatorProjectVersion": { "type": "string", "default": "0.0.1-SNAPSHOT", - "description": "Version of the project to generate", + "description": "Version of root aggregator project", "alias": "v", - "x-prompt": "What project version would you like to use?" + "x-prompt": "What version would you like to use for root aggregator project?" }, "mavenRootDirectory": { "type": "string", @@ -57,14 +59,14 @@ "dependencyManagement": { "description": "Dependency Management", "type": "string", - "default": "bom", + "default": "none", "x-prompt": { "message": "How to manage dependencies?", "type": "list", "items": [ { - "value": "bom", - "label": "I will generate later a parent project with Maven BOM (Spring Boot, Quarkus or Micronaut)" + "value": "none", + "label": "I will generate later a parent project and keep the root project for modules aggregation" }, { "value": "spring-boot-parent-pom", @@ -115,9 +117,9 @@ }, "required": [ "javaVersion", - "groupId", - "parentProjectName", - "parentProjectVersion", + "aggregatorProjectGroupId", + "aggregatorProjectName", + "aggregatorProjectVersion", "mavenRootDirectory", "dependencyManagement", "localRepoRelativePath" diff --git a/packages/nx-maven/src/utils/index.ts b/packages/nx-maven/src/utils/index.ts index ec30110c6..3cef7b990 100644 --- a/packages/nx-maven/src/utils/index.ts +++ b/packages/nx-maven/src/utils/index.ts @@ -383,7 +383,7 @@ function getDependencyManagement( return 'micronaut-parent-pom'; } - return 'bom'; + return 'none'; } function getLocalRepoRelativePath(): string {