前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >reuse project css less path folder hierarchy issue

reuse project css less path folder hierarchy issue

作者头像
Jerry Wang
发布2019-09-19 10:43:39
3960
发布2019-09-19 10:43:39
举报

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。

本文链接:https://jerry.blog.csdn.net/article/details/101001642

Question

1580024800 - Internal Incident: Q2C/GM4: Issue in ‘Simulate sales pipeline’ app. I ran into a bit of problem while implementing the fix, my local eclipse maven build will fail if I change library.source.less the way you suggested, cause base.less and global.less don’t exist there (…/…/…/…/sap/ui/core/themes/sap_bluecrystal/base.less, eclipse error message pasted below), I’m wondering if there’s any way the solution could work with both server side and local environment? Thanks again for your help.

Caused by: org.mozilla.javascript.JavaScriptException: Error importing file: JavaException: java.io.IOException: File not found: sap/cus/crm/sap/ui/core/themes/sap_bluecrystal/base.less (less-api.js#146)

In order to illustrate my point, here’s a screenshot with remarks for your kindly information.

Answer

the path in your error message looks not correct. I think you need to add 3 additional occurrences of “…/” to navigate to the correct directory.

If your directory is:

sap/cus/crm/lib/reuse/themes/sap_bluecrystal

Your need to reference the base.less / global.less files via:

Then the path should be correctly resolved. The same goes for your base theme which should reference the less files from sap/ui/core/themes/base/.

Question

it worked locally ! will it work on the server as well? Let me find it out J

// this works @import “…/…/…/…/…/…/…/sap/ui/core/themes/base/base.less”;

// this does not work, find can’t be found cause there’s no sap_bluecrystal folder in the local core @import “…/…/…/…/…/…/…/sap/ui/core/themes/sap_bluecrystal/base.less”;

Answer

the core „sap_bluecrystal“ theme is part of the „themelib_sap_bluecrystal” artefact. You need to add this dependency to your “pom.xml” file:

代码语言:javascript
复制
<dependency>
<groupId>com.sap.ui5</groupId>
<artifactId>themelib_sap_bluecrystal</artifactId>
<version>{Same version as for your other dependencies, e.g. core}</version>
</dependency>

solution

为reuse lib inject了sap_bluecrystal them的dependency

第三步,我们reuse的代码(src/sap/cus/crm/lib/reuse/themes/sap_bluecrystal/library.source.less)中,加入了sap_bluecrystal jar包里面base.less和global.less两个style的引用

代码语言:javascript
复制
// BEGIN: i314323 fix for incident 1580024800 (Q2C/GM4: Issue in 'Simulate sales pipeline' app)
@import "../../../../../../../sap/ui/core/themes/sap_bluecrystal/base.less";
@import "../../../../../../../sap/ui/core/themes/sap_bluecrystal/global.less";

// END: i314323 fix for incident 1580024800 (Q2C/GM4: Issue in 'Simulate sales pipeline' app)
本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2019年09月18日,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • Question
  • Answer
  • Question
  • Answer
  • solution
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档