code: protected String createBlob(DataService service, RepositoryId repository,
  			String path) throws MojoExecutionException {
  		File file = new File(outputDirectory, path);
  		final long length = file.length();
  		final int size = length > MAX_VALUE ? MAX_VALUE : (int) length;
  		ByteArrayOutputStream output = new ByteArrayOutputStream(size);
  		FileInputStream stream = null;
  		try {
  			stream = new FileInputStream(file);
  			final byte[] buffer = new byte[8192];
  			int read;
  			while ((read = stream.read(buffer)) != -1)
  				output.write(buffer, 0, read);
  		} catch (IOException e) {
  			throw new MojoExecutionException("Error reading file: "
  					+ getExceptionMessage(e), e);
  		} finally {
  			if (stream != null)
  				try {
  					stream.close();
  				} catch (IOException e) {
  					debug("Exception closing stream", e);
  				}
  		}
  
  		Blob blob = new Blob().setEncoding(ENCODING_BASE64);
  		String encoded = EncodingUtils.toBase64(output.toByteArray());
  		blob.setContent(encoded);
  
  		try {
  			if (isDebug())
  				debug(MessageFormat.format("Creating blob from {0}",
  						file.getAbsolutePath()));
  			if (!dryRun)
  				return service.createBlob(repository, blob);
  			else
  				return null;
  		} catch (IOException e) {
  			throw new MojoExecutionException("Error creating blob: "
  					+ getExceptionMessage(e), e);
  		}
  	}
docs: Create blob
  
  @param service
  @param repository
  @param path
  @return blob SHA-1
  @throws MojoExecutionException