From a96e61548e10bdc972737070cd2ea71aeaa3bb67 Mon Sep 17 00:00:00 2001 From: Andrey ``Bass'' Shcheglov Date: Fri, 27 May 2022 10:47:28 +0300 Subject: [PATCH] Document Maven execution ids in more detail (#1308) ### What's done: * Added the use cases (with examples) where `executionId` is indeed necessary. --- README.md | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/README.md b/README.md index 1fae9dcf52..e07e3518fb 100644 --- a/README.md +++ b/README.md @@ -124,6 +124,59 @@ If you use it and encounter any problems, feel free to open issues on [github](h To run diktat in **only-check** mode use command `$ mvn diktat:check@diktat`. To run diktat in **autocorrect** mode use command `$ mvn diktat:fix@diktat`. +Requesting a specific _Maven_ `executionId` on the command line (the trailing +`diktat` in the above example) may be essential in these cases: + + * In your `pom.xml`, you have multiple executions with different + configurations (e. g.: multiple rule sets): +
+ + ```xml + + + + diktat-basic + + diktat-analysis.yml + + + + + diktat-advanced + + diktat-analysis-advanced.yml + + + + + ``` +
+ * Your YAML file with DiKTat rules has a non-default name and/or resides in a + non-default location: +
+ + ```xml + + + diktat + + /non/default/rule-set-file.yml + + + + ``` +
+ +If you omit the `executionId`: + +```console +$ mvn diktat:check +``` + +— the plug-in will use the default configuration and search for +`diktat-analysis.yml` file in the project directory (you can still customize the +rule sets by editing the YAML file). + ## Run with Gradle using diktat-gradle-plugin Requires a gradle version no lower than 5.3.