Skip to content
This repository was archived by the owner on Dec 15, 2023. It is now read-only.
This repository was archived by the owner on Dec 15, 2023. It is now read-only.

For Java rules, files from multiple Labels of data attribute are flattened in war file #112

@jiaqi

Description

@jiaqi

In https://github.com/bazelbuild/rules_appengine/blob/master/appengine/java_appengine.bzl#L82

    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

https://github.com/jiaqi/rules_appengine/pull/1/files#diff-3b8b4a89deffca2ab1dabfb178ff7012

If it make sense I can create a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions