Class GitPrePushHookInstallerMaven

java.lang.Object
com.diffplug.spotless.GitPrePushHookInstaller
com.diffplug.spotless.GitPrePushHookInstallerMaven

public class GitPrePushHookInstallerMaven extends GitPrePushHookInstaller
Implementation of GitPrePushHookInstaller specifically for Maven-based projects. This class installs a Git pre-push hook that uses Maven to check and apply Spotless formatting.
  • Constructor Details

  • Method Details

    • preHookContent

      protected String preHookContent()
      Provides the content of the hook that should be inserted into the pre-push script.
      Specified by:
      preHookContent in class GitPrePushHookInstaller
      Returns:
      A string representing the content to include in the pre-push script.