diff --git a/src/main/org/apache/tools/ant/taskdefs/Unpack.java b/src/main/org/apache/tools/ant/taskdefs/Unpack.java index a801d0109..9cfbc4b57 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Unpack.java +++ b/src/main/org/apache/tools/ant/taskdefs/Unpack.java @@ -83,16 +83,21 @@ public abstract class Unpack extends Task { */ public void setSrcResource(Resource src) { if (!src.isExists()) { - throw new BuildException("the archive doesn't exist"); + throw new BuildException( + "the archive " + src.getName() + " doesn't exist"); } if (src.isDirectory()) { - throw new BuildException("the archive can't be a directory"); + throw new BuildException( + "the archive " + src.getName() + " can't be a directory"); } if (src instanceof FileResource) { source = ((FileResource) src).getFile(); } else if (!supportsNonFileResources()) { - throw new BuildException("Only FileSystem resources are" - + " supported."); + throw new BuildException( + "The source " + src.getName() + + " is not a FileSystem " + + "Only FileSystem resources are" + + " supported."); } srcResource = src; } diff --git a/src/main/org/apache/tools/ant/types/ArchiveFileSet.java b/src/main/org/apache/tools/ant/types/ArchiveFileSet.java index 40271c05a..278038924 100755 --- a/src/main/org/apache/tools/ant/types/ArchiveFileSet.java +++ b/src/main/org/apache/tools/ant/types/ArchiveFileSet.java @@ -242,10 +242,12 @@ public abstract class ArchiveFileSet extends FileSet { return super.getDirectoryScanner(p); } if (!src.isExists()) { - throw new BuildException("the archive doesn't exist"); + throw new BuildException( + "the archive " + src.getName() + " doesn't exist"); } if (src.isDirectory()) { - throw new BuildException("the archive can't be a directory"); + throw new BuildException("the archive " + src.getName() + + " can't be a directory"); } ArchiveScanner as = newArchiveScanner(); as.setSrc(src);