JamesEarlDouglas/xsbt-web-plugin — pull request #126 by jannic (2013-09-10 13:40:13+00:00)
Title: Handle non-jar classpath components. (Issue #125)

packageWarTask.packageWarTask handles directories and jar archives
separately: Archives are copied one by one, while directories are
copied recursively.

Without this patch, the separation between directories and archives is
made using ClasspathUtilities.isArchive. This has two disadvantages:

1) ClasspathUtilities.isArchive, without the optional parameter
contentFallback, only looks at the filename. So an archive which is
not named .jar or .zip is not correctly identified.

2) Even using contentFallback, ClasspathUtilities.isArchive would,
of course, return 'false' for non-archive files. This would make
packageWarTask think it's a directory.

Both cases lead to a rather confusing error message:

java.io.FileNotFoundException: //target/webapp/WEB-INF/classes (Is a directory)

With this patch, instead, packageWarTask uses _.isDirectory to separate
between directories and archives. This handles non-archive files like
archives, by just adding them to the classpath, without failing the build.

Additionally, filter out non-existing classpath components.

This fixes JamesEarlDouglas/xsbt-web-plugin#125