Server is not considering application dependency
See original GitHub issueExpected Behavior
If you are developing on a library (or future component types see related issue https://github.com/SAP/ui5-tooling/issues/45) and you add an application project as a
dependency
or devDependency
, the application dependency should be served as the server root.
Also the dependent applications index.html etc. should be served.
Current Behavior
Currently the application dependency is not served at all when beeing added as a dependency.
The application appears in ui5 tree, but it’ll still not be served.
Steps to reproduce the issue
- Create a library project
- Add a application project as dependency
- Try to serve
Affected components
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
java - Way to keep minimal application-server dependency?
1. Agree. · No, the format to specify the location of a JNDI server is not different. The values are though. · Thanks...
Read more >Understanding Application Dependencies
Application Dependencies occur when technology components, applications, and servers rely on one another to provide a business solution or service.
Read more >10 Installing and Configuring Application Dependency and ...
Collect the following application server information: admin server host ... Select the location to install into when prompted, do not create links.
Read more >Specifying external dependencies to applications running on ...
This document details the steps to specify external dependencies to applications running on WebSphere® Application Server Community Edition.
Read more >Application Dependency Mapping: The Complete Guide
And this makes sense when you consider that an application dependency map is basically a visual representation of the different servers used by...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi Kristian,
Thank you for your input.
I’ll try to clarify some points:
The translators create a mostly unopinionated dependency tree.
The projectPreprocessor takes in that dependency tree and enriches it with project specific configurations. These configurations are partially type-dependent. For example a
webapp
-directory configuration is only possible in projects of typeapplication
. Therefore, type-specific “formatters” are being used to configure the projects.Finally, the normalizer uses a translator and the projectPreprocessor to provide a configured dependency tree that can be used by the ui5-builder and ui5-server.
This is the case and will continue to be the case. Technically there is no need for an application project to be the root project. It was just a restriction we put in place for the time being.
Background: application projects do not have a namespace. This means their resources are always mapped to the root (
/
) path. Multiple application projects in the same tree would therefore probably end up having resource clashes (e.g. for two application projects, bothindex.html
files would be mapped to the path/index.html
).To prevent this we currently ignore all application projects that are not the root project. We will change this with SAP/ui5-project#62 to support use cases like yours. The new logic basically ignores all application projects but the one closest to the root (not necessarily the root project).
Note that the mapping between physical and virtual paths is done by ui5-fs. ui5-builder and ui5-server facilitate ui5-fs. They throw in a project tree and get a “virtual” file system in return. This means ui5-server does not deal with any path mapping, it just serves the ui5 file system. Currently, ui5-server does not even look at the type of any projects.
ui5-fs doesn’t really care about the position of a project in the tree. An application project is always mapped to the root (
/
) (as configured by the ApplicationFormatter during project preprocessing in ui5-project).Therefore, after the “application project must be root”-restriction has been lifted with SAP/ui5-project#62, starting the server in projectA will have the same effect as starting it in projectB.
Fix can be tested with UI5 CLI v0.2.4