code: protected final String getEncoding(final boolean warnIfPlatformEncoding) {
  
          // Harvest information
          final boolean configuredEncoding = encoding != null;
          final String fileEncoding = System.getProperty(SYSTEM_FILE_ENCODING_PROPERTY);
          final String effectiveEncoding = configuredEncoding ? encoding : fileEncoding;
  
          // Should we warn if using platform encoding (i.e. platform dependent)?
          if (!configuredEncoding && warnIfPlatformEncoding) {
              getLog().warn("Using platform encoding [" + effectiveEncoding + "], i.e. build is platform dependent!");
          } else if (getLog().isDebugEnabled()) {
              getLog().debug("Using " + (configuredEncoding ? "explicitly configured" : "system property")
                      + " encoding [" + effectiveEncoding + "]");
          }
  
          // All Done.
          return effectiveEncoding;
      }
docs: <p>The algorithm for finding the encoding to use is as follows (where the first non-null value found
  is used for encoding):</p>
  <ol>
  <li>If the configuration property is explicitly given within the plugin's configuration, use that value.</li>
  <li>If the Maven property <code>project.build.sourceEncoding</code> is defined, use its value.</li>
  <li>Otherwise use the value from the system property <code>file.encoding</code>.</li>
  </ol>
  
  @param warnIfPlatformEncoding Defines if a warning should be logged if encoding is not configured but
  the platform encoding (system property {@code file.encoding}) is used
  @return The encoding to be used by this AbstractJaxbMojo and its tools.
  @see #encoding