IBM / cics-bundle-gradle

The plugin to build and deploy CICS bundles in a Gradle build.
Eclipse Public License 2.0
7 stars 20 forks source link

"web-app" should be "webapp" in gradle-war-demo sample #74

Closed tomotagwork closed 4 years ago

tomotagwork commented 4 years ago

Hi, I have run gradle-multipart-sample. I can build and deploy bundle successfully but I can not access deployed application with URL(http://myserver.site.domain.com:1234/gradle-war-demo-1.0.0) shown in README. I think it is because the directory name for web application sources is "src/main/web-app" under gradle-war-demo. https://github.com/IBM/cics-bundle-gradle/tree/master/samples/gradle-multipart-sample/gradle-war-demo/src/main/web-app

Refer to Gradle document: The War Plugin

The default behavior of the War task is to copy the content of src/main/webapp to the root of the archive. Your webapp directory may of course contain a WEB-INF sub-directory, which may contain a web.xml file. Your compiled classes are compiled to WEB-INF/classes. All the dependencies of the runtime [1] configuration are copied to WEB-INF/lib.

The contents of web-app are not included deployed WAR file, so index.html can not be found when I access the sample application.

Additionally, there is "src/main/web-app" in "gradle-war-sample/standalone-war-demo".
https://github.com/IBM/cics-bundle-gradle/tree/master/samples/gradle-war-sample/standalone-war-demo/src/main/web-app I think it cause same issue.

Regards, Tomohiro Taguchi

davenice commented 4 years ago

Thanks @tomotagwork were you able to verify this as working now? @ledina reopened it for us to test it! If you've tested then that's great :-)

tomotagwork commented 4 years ago

Hi, It doesn't work. web.xml for gradle-war-demo is empty. https://github.com/IBM/cics-bundle-gradle/blob/master/samples/gradle-multipart-sample/gradle-war-demo/src/main/webapp/WEB-INF/web.xml

ledina commented 4 years ago

Taguchi-san, many thanks for trying it again, and apologies for the issue. I have a fix which I can deliver tomorrow once one of my team members has reviewed it. We will then go through and test again to make sure it is all working as expected.

In the meantime, did you happen to try the other sample (web.xml is OK on that one)? Or if you wanted to get further with this sample, you could add this to your empty web.xml:

`<?xml version="1.0"?> <web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" version="3.1">

CLIENT-CERT

`

ledina commented 4 years ago

Reopening until we have had a chance to do some end to end testing

tomotagwork commented 4 years ago

It worked successfully in my test environment. Thanks!