apache/maven · error · TransferFailedException
Error copying temporary file to the final destination: " + e
Error message
Error copying temporary file to the final destination: " + e.getMessage()
What it means
Error "Error copying temporary file to the final destination: " + e.getMessage()" thrown in apache/maven.
Source
Thrown at compat/maven-compat/src/main/java/org/apache/maven/repository/legacy/DefaultWagonManager.java:468
// The temporary file is named destination + ".tmp" and is done this way to ensure
// that the temporary file is in the same file system as the destination because the
// File.renameTo operation doesn't really work across file systems.
// So we will attempt to do a File.renameTo for efficiency and atomicity, if this fails
// then we will use a brute force copy and delete the temporary file.
if (!temp.renameTo(destination)) {
try {
Files.copy(
temp.toPath(),
destination.toPath(),
StandardCopyOption.REPLACE_EXISTING,
StandardCopyOption.COPY_ATTRIBUTES);
if (!temp.delete()) {
temp.deleteOnExit();
}
} catch (IOException e) {
throw new TransferFailedException(
"Error copying temporary file to the final destination: " + e.getMessage(), e);
}
}
}
}
//
// Publisher
//
@Override
public void putArtifact(
File source, Artifact artifact, ArtifactRepository deploymentRepository, TransferListener downloadMonitor)
throws TransferFailedException {
putRemoteFile(deploymentRepository, source, deploymentRepository.pathOf(artifact), downloadMonitor);
}
@Override
public void putArtifactMetadata(File source, ArtifactMetadata artifactMetadata, ArtifactRepository repository)View on GitHub (pinned to e4093d4e12)
When it happens
Trigger: Thrown at compat/maven-compat/src/main/java/org/apache/maven/repository/legacy/DefaultWagonManager.java:468 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/maven@e4093d4e12 (2026-08-21).
Data as JSON: /api/errors/efe46cbf6e658ab4.
Report an issue: GitHub.