Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(executors): add skipProject option #718

Merged
merged 1 commit into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion packages/nx-maven/src/executors/run-task/executor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ export default async function runExecutor(
task = options.task;
}

const command = `${getExecutable()} ${task} -pl :${context.projectName}`;
let command = `${getExecutable()} ${task}`;

if (!options.skipProject) {
command += ` -pl :${context.projectName}`;
}

const mavenRootDirectory = getMavenRootDirectory();
const result = runCommand(command, join(workspaceRoot, mavenRootDirectory));
Expand Down
1 change: 1 addition & 0 deletions packages/nx-maven/src/executors/run-task/schema.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ export interface RunTaskExecutorSchema {
task: string | string[];
keepItRunning?: boolean;
outputDirLocalRepo?: string;
skipProject?: boolean;
}
5 changes: 5 additions & 0 deletions packages/nx-maven/src/executors/run-task/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@
"outputDirLocalRepo": {
"type": "string",
"description": "The artifacts created during the `install phase` will be placed in this sub-directory of the Maven local repository (dynamically calculated)"
},
"skipProject": {
"type": "boolean",
"description": "Skip specifying a project by generating `-pl :project` part",
"default": false
}
},
"required": ["task"]
Expand Down
Loading