You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by kw...@apache.org on 2022/11/30 09:15:15 UTC

[maven-parent] branch master updated: [MPOM-370] Document "format" profile (#95)

This is an automated email from the ASF dual-hosted git repository.

kwin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-parent.git


The following commit(s) were added to refs/heads/master by this push:
     new 77f5677  [MPOM-370] Document "format" profile (#95)
77f5677 is described below

commit 77f56779a10cde870ad9aba98fbe9e5892249f0b
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Wed Nov 30 10:15:10 2022 +0100

    [MPOM-370] Document "format" profile (#95)
---
 src/site-docs/apt/index.apt.vm | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/src/site-docs/apt/index.apt.vm b/src/site-docs/apt/index.apt.vm
index d6a5e2d..b44161d 100644
--- a/src/site-docs/apt/index.apt.vm
+++ b/src/site-docs/apt/index.apt.vm
@@ -56,6 +56,17 @@ mvn -Preporting site
     This POM provides <<<jdk-toolchain>>> profile to activate JDK selection as a toolchain with version
     requirement configured as minimum java version for the project.
 
+* The <<<format>>> Profile
+
+    Since version 38 the <<<format>>> profile can be used to explicitly format source files with
+    {{{https://github.com/diffplug/spotless/tree/main/plugin-maven}spotless-maven-plugin}} according to 
+    {{{/developers/conventions/code.html}Maven standards}}.
+    This requires the phase {{{/guides/introduction/introduction-to-the-lifecycle.html#default-lifecycle}process-sources}}.
+    After applying bigger reformatting it is recommended to add or update a <<<.git-blame-ignore-revs>>> file in the root of the repository
+    containing a line with the SHA1 of the formatting commit to ignore those changes when using <<<git blame>>> (or equivalent concepts).
+    This is automatically considered by {{{https://docs.github.com/en/repositories/working-with-files/using-files/viewing-a-file#bypassing-git-blame-ignore-revs-in-the-blame-view}GitHub}}
+    and can optionally be considered with {{{https://git-scm.com/docs/git-blame#Documentation/git-blame.txt---ignore-revs-fileltfilegt}local <<<git blame>>>}}
+
 * Site Publication
 
     This POM prepares site publication to {{{/developers/website/index.html}Apache Maven's site svnpubsub}}.