SAP-archive / cloud-espm-v2

This sample is a reference application project, showcasing an end-to-end development scenario for a Java-based app on SAP BTP. The app has a SAPUI5 web frontend, uses OData to connect to a Java-based cloud backend which in turn connects via JPA to an SAP HANA DB in the cloud.
https://open.sap.com/courses/hcp2-1
Apache License 2.0
104 stars 85 forks source link

Run on Server Option Not Avaliable #4

Closed ustadji closed 7 years ago

ustadji commented 7 years ago

Hi guys, the Run on Server option is not available as referenced in the readme for deployment to local Cloud runtime. I'm guessing because the project was imported as a Maven project instead of being setup as a Dynamic Web Project. I'm unsure if I switch the espm-cloud-web project to a faceted project and enable the Dynamic Web Project, will it break anything. Any help or suggestions on deploying locally?

ustadji commented 7 years ago

After much fiddling, I managed to get it to deploy locally. I had to explicitly enable Project Facets and enable the Dynamic Web Project 3.0 facet. I then had to add the following to the Web Deployment Assembly which is under Properties for espm-cloud-web:

If there is an easier way to do this for mavenized projects, please do let me know!

navinkrishnan commented 7 years ago

Hi @ustadji

Importing as Maven project, building it and running on server is the easiest way.

Can you please provide few details to analyse what went wrong in your scenario ? Eclipse version and the OS?

ustadji commented 7 years ago

Hi Navin, thanks for your response... my Eclipse version is the latest version of Neon and my OS is Win 10. When you say 'running it on the server' do you mean deploying it to the cloud? If so, that works without any issues as its just a matter of deploying the war artifact generated by Maven to the SCP platform. It is running locally - on the local Java Web Tomcat 8 server instance - where the issue was. The readme documentation assumes there is a "Run on Server" option available once you import the maven project into the workspace but that is actually not the case. By default, the project is not stereotyped as a 'Dynamic Web Project' which inherently disables the context menu option "Run on Server". Although I managed to get it to work, I was just wondering whether there was a more cleaner method of deploying the application locally without having to change Project Facets within Eclipse.

skrishnakumar commented 7 years ago

Since, we don't have any response, assume that the issues is solved. Hence closing the issue

ustadji commented 7 years ago

Hi Skrishnakumar, The issue hasn't been addressed as yet or solved.... please see my last comment.....