use of org.gradle.internal.resource.local.LocalResource 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 {
LocalResource localResource = new MavenTransferLoggingFileResource(file, resource);
getDelegate().putRemoteFile(localResource, 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