Skip to content

Commit

Permalink
build: work in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
khalilou88 committed Oct 20, 2023
1 parent 1a53572 commit 41e416c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 19 deletions.

This file was deleted.

28 changes: 21 additions & 7 deletions packages/nx-maven/src/generators/init/generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ import {
updateGitIgnore,
} from '../../utils/generators';
import {
ProjectConfiguration,
Tree,
addProjectConfiguration,
formatFiles,
generateFiles,
joinPathFragments,
Expand Down Expand Up @@ -65,19 +67,31 @@ function addFiles(tree: Tree, options: NormalizedSchema) {
options.mavenRootDirectory,
templateOptions,
);
}

export default async function (tree: Tree, options: NxMavenGeneratorSchema) {
const normalizedOptions = normalizeOptions(tree, options);

if (options.mavenRootDirectory) {
generateFiles(
const projectConfiguration: ProjectConfiguration = {
root: normalizedOptions.mavenRootDirectory,
targets: {
build: {
executor: '@jnxplus/nx-maven:run-task',
options: {
task: 'install -N',
},
},
},
};

addProjectConfiguration(
tree,
path.join(__dirname, 'files', 'nx'),
options.mavenRootDirectory,
templateOptions,
normalizedOptions.parentProjectName,
projectConfiguration,
);
}
}

export default async function (tree: Tree, options: NxMavenGeneratorSchema) {
const normalizedOptions = normalizeOptions(tree, options);
addFiles(tree, normalizedOptions);
updateNxJson(tree, normalizedOptions);
updateGitIgnore(tree, options.skipWrapper);
Expand Down

0 comments on commit 41e416c

Please sign in to comment.