protected void enforceBestPractices()

in src/main/java/org/apache/maven/plugins/gpg/AbstractGpgMojo.java [327:335]


    protected void enforceBestPractices() throws MojoFailureException {
        // if any of those are not blank: meaning user did explicitly configure these
        if (isNotBlank(passphrase) || isNotBlank(passphraseServerId)) {
            // Stop propagating worst practices: passphrase MUST NOT be in any file on disk
            throw new MojoFailureException(
                    "Do not store passphrase in any file (disk or SCM repository), rely on GnuPG agent or provide passphrase in "
                            + passphraseEnvName + " environment variable.");
        }
    }