while (iter.hasNext()) {
AttachedArtifact attached = (AttachedArtifact)iter.next();
Artifact attachedArtifact = createArtifactFromAttached(attached, artifact);
try {
deployer.deploy( attachedArtifact.getFile(), attachedArtifact, deploymentRepository, localRepo );
}
catch (ArtifactDeploymentException e) {
throw new BuildException(
"Error deploying attached artifact '" + attachedArtifact.getDependencyConflictId() + "': " + e.getMessage(), e );
}