Skip *.js source directories
[cc0/argeo-build.git] / src / org / argeo / build / Make.java
index 798e1ea8627758a5a6ba1ff08ed74e14f405e255..8e872dcb61af818ea71946b4369197eaf6e7ddc4 100644 (file)
@@ -518,6 +518,16 @@ public class Make {
                                                Files.copy(file, jarOut);
                                        return FileVisitResult.CONTINUE;
                                }
+
+                               @Override
+                               public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException {
+                                       // skip directories ending with .js
+                                       // TODO find something more robust?
+                                       if (dir.getFileName().endsWith(".js"))
+                                               return FileVisitResult.SKIP_SUBTREE;
+                                       return super.preVisitDirectory(dir, attrs);
+                               }
+
                        });
 
                        // add legal notices and licenses