-
Notifications
You must be signed in to change notification settings - Fork 39
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
Document Maven execution ids in more detail #1308
Document Maven execution ids in more detail #1308
Conversation
### What's done: * Added the use cases (with examples) where `executionId` is indeed necessary.
``` | ||
</details> | ||
|
||
If you omit the `executionId`: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it always use default default settings, even if custom configuration is tied to the same execution phase?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whenever an execution is bound to a Maven phase, the executionId
becomes irrelevant (and unnecessary).
Alternatively, if you don't bind a specific execution to a phase, the default executionId
will be default-cli
:
$ mvn diktat:check
[INFO] Scanning for projects...
[INFO]
[INFO] ---------------< org.cqfn.diktat:diktat-examples-maven >----------------
[INFO] Building diktat-examples-maven 1.1.0-SNAPSHOT
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- diktat-maven-plugin:1.1.0:check (default-cli) @ diktat-examples-maven ---
[INFO] Running diKTat plugin with configuration file /home/alice/diktat-example-maven/foo.yml and inputs [/home/alice/diktat-example-maven/diktat-example
-maven/src/main/kotlin]
[WARNING] Not going to check indentation because there are tabs
[WARNING] You have enabled TRAILING_COMMA, but rule will remain inactive until you explicitly set configuration options. See [available-rules.md] for possible configuration options.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.467 s
[INFO] Finished at: 2022-05-26T19:05:49+03:00
[INFO] ------------------------------------------------------------------------
So, technically, you can create a custom configuration with such a default name, but I doubt Maven has any kind of contract for this behaviour. I mean, we probably shouldn't rely on this, as it may change (and break).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like default-cli
is part of official maven documentation: https://maven.apache.org/guides/mini/guide-default-execution-ids.html
Codecov Report
@@ Coverage Diff @@
## master #1308 +/- ##
=========================================
Coverage 82.01% 82.01%
Complexity 2530 2530
=========================================
Files 105 105
Lines 7201 7201
Branches 2058 2058
=========================================
Hits 5906 5906
Misses 346 346
Partials 949 949
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
What's done:
executionId
is indeed necessary.