SAP / openui5

OpenUI5 lets you build enterprise-ready web applications, responsive to all devices, running on almost any browser of your choice.
http://openui5.org
Apache License 2.0
2.95k stars 1.23k forks source link

Missing sap-ui-version.json in Bower installation #810

Closed Hirse closed 8 years ago

Hirse commented 8 years ago

Inspired by this sample app, I have installed OpenUI5 with Bower.

Everything seems to work fine, except that I get two failing requests to resources/sap-ui-version.json. While this is not critical, it does bother me to have errors while developing.

The dependencies in bower.json look like this:

  "dependencies": {
    "openui5-sap.ui.core": "openui5/packaged-sap.ui.core#~1.36.0",
    "openui5-sap.ui.layout": "openui5/packaged-sap.ui.layout#~1.36.0",
    "openui5-sap.m": "openui5/packaged-sap.m#~1.36.0",
    "openui5-themelib_sap_bluecrystal": "openui5/packaged-themelib_sap_bluecrystal#~1.36.0"
  }
matz3 commented 8 years ago

The sap-ui-version.json file is currently not part of the openui5 delivery via bower. As the file is optional it should usually not get loaded by default. I just tried the mentioned sample app with version 1.36.0 and it worked fine without any request.

Can you please share an example on how to reproduce this? E.g. some HTML snippet and exact openui5 version?

Hirse commented 8 years ago

You are right, it is not requested by SAPUI5.

I have the UI5 Inspector installed which requests this file (several times).

matz3 commented 8 years ago

Alright that's true.

As there is already a sap-ui-version.json file in the openui5 testsuite (https://github.com/SAP/openui5/blob/master/src/testsuite/src/main/webapp/resources/sap-ui-version.json) for development puroses I think we should also create it for the bower release and replace the placeholders with the actual values.

@petermuessig @codeworrior what do you think?

matz3 commented 8 years ago

@Hirse I had a discussion with @codeworrior about this and we came to the conclusion that it wouldn't be correct to put a sap-ui-version.json into the openui5 bower delivery. As the file is meant to describe a complete distribution of libraries, there is currently no place where we could put it in. The set of libraries depends on your dependencies, so we can't provide it statically. For now I would suggest you to just create a file within your project and maintain it by yourself if you want to get rid of the ugly 404 error caused by the Chrome extension.

doniaZaela commented 6 years ago

Hi, @matz3 I get the same error, so I have a question: I found the file: sap-ui-version.json at https://github.com/brakmic/OpenUI5_Table_Demo/blob/master/Scripts/vendor/sap/resources/sap-ui-version.json However, where in my project structure should I put ?

Thanks!

matz3 commented 6 years ago

@doniaZaela the file seems to come from a downloaded OpenUI5 package (from http://openui5.org/download.html) and is expected to be top-level in the resources folder (next to the sap-ui-core.js file.

doniaZaela commented 6 years ago

@matz3 Thanks for your response. Yes, I found it as you described when I downloaded openui5 sdk. However, I am not sure where to put it in my project in eclipse. I have created a the folder "resources" at two spots as shown here: screen shot 2018-03-15 at 10 25 06 am However, I still get the error: screen shot 2018-03-15 at 10 26 19 am I am still very new with SAPUI5, so Thanks for your help.

Best Wishes

codeworrior commented 6 years ago

My guess would be

myFirstApp/WebContent/resources/sap-ui-version.json

doniaZaela commented 6 years ago

@codeworrior Yes right! Vielen Dank!

matz3 commented 5 years ago

@doniaZaela FYI, the UI5 Tooling will create a sap-ui-version.json when building a self-contained application.