code: private void installChecksum( File originalFile, File installedFile, Digester digester, String ext )
              throws MojoExecutionException
      {
          String checksum;
          getLog().debug( "Calculating " + digester.getAlgorithm() + " checksum for " + originalFile );
          try
          {
              checksum = digester.calc( originalFile );
          }
          catch ( DigesterException e )
          {
              throw new MojoExecutionException( "Failed to calculate " + digester.getAlgorithm() + " checksum for "
                      + originalFile, e );
          }
  
          File checksumFile = new File( installedFile.getAbsolutePath() + ext );
          getLog().debug( "Installing checksum to " + checksumFile );
          try
          {
              checksumFile.getParentFile().mkdirs();
              FileUtils.fileWrite( checksumFile.getAbsolutePath(), "UTF-8", checksum );
          }
          catch ( IOException e )
          {
              throw new MojoExecutionException( "Failed to install checksum to " + checksumFile, e );
          }
      }
docs: Installs a checksum for the specified file.
  
  @param originalFile The path to the file from which the checksum is generated, must not be <code>null</code>.
  @param installedFile The base path from which the path to the checksum files is derived by appending the given
  file extension, must not be <code>null</code>.
  @param digester The checksum algorithm to use, must not be <code>null</code>.
  @param ext The file extension (including the leading dot) to use for the checksum file, must not be
  <code>null</code>.
  @throws MojoExecutionException If the checksum could not be installed.