csFile.delete();
}
}
protected void putSignature(Artifact artifact, File src, String dest, boolean overwrite) throws IOException {
SignatureGenerator gen = getSettings().getSignatureGenerator(signerName);
if (gen == null) {
throw new IllegalArgumentException("Couldn't sign the artifacts! " +
"Unknown signer name: '" + signerName + "'");
}
File tempFile = File.createTempFile("ivytemp", gen.getExtension());
try {
gen.sign(src, tempFile);
repository.put(DefaultArtifact.cloneWithAnotherTypeAndExt(artifact,
gen.getExtension(), artifact.getExt() + "." + gen.getExtension()),
tempFile, dest + "." + gen.getExtension(), overwrite);
} finally {
tempFile.delete();
}
}