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

Document Maven execution ids in more detail #1308

Merged

Conversation

unix-junkie
Copy link
Contributor

What's done:

  • Added the use cases (with examples) where executionId is indeed necessary.

### What's done:

 * Added the use cases (with examples) where `executionId` is indeed necessary.
@unix-junkie unix-junkie requested review from petertrr and orchestr7 May 26, 2022 15:51
@unix-junkie unix-junkie enabled auto-merge (squash) May 26, 2022 15:51
@unix-junkie unix-junkie added the documentation Improvements or additions to documentation label May 26, 2022
```
</details>

If you omit the `executionId`:
Copy link
Member

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?

Copy link
Contributor Author

@unix-junkie unix-junkie May 26, 2022

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).

Copy link
Member

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
Copy link

codecov bot commented May 26, 2022

Codecov Report

Merging #1308 (ec11c35) into master (23ebf80) will not change coverage.
The diff coverage is n/a.

@@            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           
Flag Coverage Δ
unittests 82.01% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 23ebf80...ec11c35. Read the comment docs.

@unix-junkie unix-junkie requested a review from petertrr May 26, 2022 16:19
@unix-junkie unix-junkie merged commit a96e615 into master May 27, 2022
@unix-junkie unix-junkie deleted the feature/andrey.shcheglov/maven-execution-id-example branch May 27, 2022 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants