SAP / generator-easy-ui5

Meta-generator various project types within the UI5 Universe
https://blogs.sap.com/2021/04/09/easy-ui5-3.0-from-community-contributions-to-community-plugins/
Apache License 2.0
230 stars 72 forks source link

project type "Application Router @ Cloud Foundry" isn't deployed properly #58

Closed vobu closed 3 years ago

vobu commented 3 years ago

Easy-Ui5 version: 2.4.2

OS/version: macOS 11.1

Browser/version (+device/version): -doesn't apply-

Steps to reproduce the problem:

  1. yo easy-ui5
  2. ? How do you want to name this project? myUI5App
    ? Which namespace do you want to use? com.myorg
    ? On which platform would you like to host the application? Application Router @ Cloud Foundry
    ? Which view type do you want to use? XML
    ? How do you want to name your main view? MainView
    ? Where should your UI5 libs be served from? Content delivery network (OpenUI5)
    ? Would you like to create a new directory for the project? (Y/n) No
  3. npm run deploy ...all fine, local build executes, upload + deployment works...
  4. opening https://$appid.cfapps.eu10.hana.ondemand.com/ redirects to https://$appid.cfapps.eu10.hana.ondemand.com/uimodule/index.html and fails with 404 Not found

What is the expected result? see the bare bones ui5 app running on cf

What happens instead? http 404 - not found

Any other information? (attach screenshot if possible) reason is that in /uimodule/ui5.yaml, a custom builder task is defined to zip up the result of ui5 build. the uimodule.zip then ends up as /approuter/uimodule/webapp/uimodule.zip and upon deployment to cf doesn't get extracted automatically, but stays as is (as a zip).

possible remedies:

IObert commented 3 years ago

Thanks @vobu and @jdtimmerman for both detailed bug reports (and solution) proposals :)

I'll fix the issue first thing tomorrow.

PS: You can also solve the issue with the keepResources option:

  customTasks:
    -  name: ui5-task-zipper
       afterTask: uglify
       configuration:
         keepResources: true
         archiveName: uimodule

But removing it overall is the best solution

IObert commented 3 years ago

Thanks for reporting. The issue should be fixed now