if path and in_file.short_path.startswith(path):
output_path += in_file.short_path[len(path):]
when in_file.short_path does not start with path, what happens is output_path will remain output, the root directory of war file. And eventually ln -s $(pwd)/%s %s creates in_file symlink at the root directory, and ignores the directory structure of in_file.
If multiple files from different directories have the same name, one will overwrite the other.
I believe the desired behavior is to preserve the original directory structure of in_file and create symlink at output_path/in_file.path instead of output_path. I've got it working in a fork, it looks roughly like this
In https://github.com/bazelbuild/rules_appengine/blob/master/appengine/java_appengine.bzl#L82
when in_file.short_path does not start with path, what happens is output_path will remain output, the root directory of war file. And eventually
ln -s $(pwd)/%s %s
creates in_file symlink at the root directory, and ignores the directory structure of in_file.If multiple files from different directories have the same name, one will overwrite the other.
I believe the desired behavior is to preserve the original directory structure of in_file and create symlink at output_path/in_file.path instead of output_path. I've got it working in a fork, it looks roughly like this
https://github.com/jiaqi/rules_appengine/pull/1/files#diff-3b8b4a89deffca2ab1dabfb178ff7012
If it make sense I can create a PR.