问题
I created a new app in OpenShift. App got created successfully and cloned to the local directory also. I modified and changed the default index.html all also add web.xml to put index.html in welcome-file-list. But it doesn't show the changes at all. when I run the URL, it would show the default index.html.
even appending the index.html URL, it still shows the default page
I deleted the app multiple times and created a new one with a new local repo in order to check what is going wrong
Every time I do SSH on the app, the current folder, would sometimes show the changes updated while sometimes, it doesnt show.
I used the basic process to create app, given in the tutorials:
rhc app-create <appname> tomcat7
After creating the app, I modified index.html and git add --all, git commit -m, git push
The output was success as shown here:
remote: Git Post-Receive Result: success
remote: Activation status: success
remote: Deployment completed with status: success
I have spent almost half of the day looking around on web for same issue. It has never happened before. I already had an application deployed and I would push updates to the App and they would reflect smoothly.
Please help me to resolve it.thank you
回答1:
Well, I found a solution to it.
Once we create the app in rhcloud, It will create the pom.xml which would have many default values with it. so the bottom line is:
Do not replace the
pom.xmlwith the one which you have kept offline for your project. Modify the pom.xml already created in rhcloud webapp and incase you want to change the compiler version and dependencies, do it their on the xml file which is created by-default. Dont completely replace it.
It worked for me. Hope works for any one who had this issue.
来源:https://stackoverflow.com/questions/31599959/openshift-after-modifying-code-and-git-push-changes-dont-show