use of org.gradle.internal.resource.ReadableContent in project gradle by gradle.
the class RepositoryTransportDeployWagon method put.
@Override
public final void put(File file, String resourceName) throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException {
Resource resource = new Resource(resourceName);
this.transferEventSupport.fireTransferInitiated(transferEvent(resource, TRANSFER_INITIATED, REQUEST_PUT));
try {
ReadableContent content = new MavenTransferLoggingFileResource(file, resource);
getDelegate().putRemoteFile(content, resourceName);
} catch (Exception e) {
this.transferEventSupport.fireTransferError(transferEvent(resource, e, REQUEST_PUT));
throw new TransferFailedException(String.format("Could not write to resource '%s'", resourceName), e);
}
this.transferEventSupport.fireTransferCompleted(transferEvent(resource, TRANSFER_COMPLETED, REQUEST_PUT));
}
Aggregations