GoogleCloudPlatform / gcloud-maven-plugin

Cloud SDK Maven Plugin for Google App Engine (Managed VMs and non Managed VMs)
Apache License 2.0
29 stars 24 forks source link

Serving static files with a different URL path #71

Closed wmwong closed 8 years ago

wmwong commented 8 years ago

I'm trying to use AppEngine to serve a static file through a differently named URL path (myfile.json served at /some_file).

For the other supported languages such as Python, this can be configured through app.yaml (https://cloud.google.com/appengine/docs/python/config/appconfig?hl=en#Python_app_yaml_Static_file_handlers):

handlers:
  - url: /some_file
    static_files: myfile.json
    upload: myfile.json

I can't seem to find an equivalent for appengine-web.xml (https://cloud.google.com/appengine/docs/java/config/appconfig#Java_appengine_web_xml_Static_files_and_resource_files). It can seem to only be configured to serve the file using the filename (myfile.json served at /myfile.json).

Is what I'm trying to do possible with AppEngine and Java?

ludoch commented 8 years ago

Does not seem to be a gcloud maven bug.

On Mon, Jan 4, 2016 at 10:37 AM, Wesley Wong notifications@github.com wrote:

I'm trying to use AppEngine to serve a static file through a differently named URL path (myfile.json served at /some_file).

For the other supported languages such as Python, this can be configured through app.yaml ( https://cloud.google.com/appengine/docs/python/config/appconfig?hl=en#Python_app_yaml_Static_file_handlers ):

handlers:

  • url: /some_file static_files: myfile.json upload: myfile.json

I can't seem to find an equivalent for appengine-web.xml ( https://cloud.google.com/appengine/docs/java/config/appconfig#Java_appengine_web_xml_Static_files_and_resource_files). It can seem to only be configured to serve the file using the filename (myfile.json served at /myfile.json).

Is what I'm trying to do possible with AppEngine and Java?

— Reply to this email directly or view it on GitHub https://github.com/GoogleCloudPlatform/gcloud-maven-plugin/issues/71.

wmwong commented 8 years ago

Isn't gcloud maven responsible for generating app.yaml from appengine-web.xml? Or is gcloud doing that and this should be filed with gcloud?

ludoch commented 8 years ago

It is the appcfg.java tooling from gae 1 that we are reusing to only do the staging phase. Not in Gcloud, not Maven. Maven is just delegating to Gcloud which is delegating to appcfg staging phase.

On Tue, Jan 5, 2016 at 10:22 AM, Wesley Wong notifications@github.com wrote:

Isn't gcloud maven responsible for generating app.yaml from appengine-web.xml? Or is gcloud doing that and this should be filed with gcloud?

— Reply to this email directly or view it on GitHub https://github.com/GoogleCloudPlatform/gcloud-maven-plugin/issues/71#issuecomment-169088206 .

wmwong commented 8 years ago

Found a bug about the limitations of handlers in Java: https://code.google.com/p/googleappengine/issues/detail?id=2070&q=java%20static-files&colspec=ID%20Type%20Component%20Status%20Stars%20Summary%20Language%20Priority%20Owner%20Log

Closing this.