Skip to content
This repository has been archived by the owner on Jun 19, 2024. It is now read-only.

feature: Add "path" to webapp generator #1325

Merged
merged 2 commits into from
Jul 23, 2018

Conversation

rhuss
Copy link
Contributor

@rhuss rhuss commented Jul 19, 2018

and also fix the assembly to include the proper artefact, regardless
of the 'final' name.

Fixes #1276.

and also fix the assembly to include the proper artefact, regardless
of the 'final' name.

Fixes fabric8io#1276.
@rhuss rhuss requested a review from rohanKanojia July 19, 2018 12:39
@rhuss
Copy link
Contributor Author

rhuss commented Jul 19, 2018

Added a new feature 'path' which use the root context path as default ("/"). This is also a perfect fit to the generate route on OpenShift (which otherwise wouldn't find the service because it does not know about the context path).

Currently, it doesn't work with the Tomcat base image because of permission problems when overwriting the ROOT dir. This will be fixed asap with fabric8io-images/tomcat#2

Copy link
Member

@rohanKanojia rohanKanojia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot, I tested it and now I don't see error even when finalName is not set

@rohanKanojia
Copy link
Member

@rhuss : Did you tested it on Openshift/Kubernetes? Actually, I was testing it on Openshift(in -Dfabric8.mode=kubernetes) but application pod goes in ImagePullBackOff state(Might be some problem with my Openshift)

@rhuss
Copy link
Contributor Author

rhuss commented Jul 20, 2018

I tested it with minishift and it worked as expected.

@rhuss
Copy link
Contributor Author

rhuss commented Jul 20, 2018

btw, ne Tomcat images has been fixed, released and f-m-p uses them. These images fixes the problem with root context.

I'm going probably to update Jetty and Wildfly Images soon, too, to use the latest upstream servers.

@rhuss
Copy link
Contributor Author

rhuss commented Jul 20, 2018

@rohanKanojia if you use openshift, please be sure that the user part of your image is the same as the projectname in OpenShift.

That's what I did in samples/webapp

mvn package fabric8:build fabric8:resource fabric8:apply -Dfabric8.generator.webapp.server=jetty -Dfabric8.generator.name="myproject/%a:%l"

assuming that I'm connected to a project "myproject". Also note, that %l as there are still problems with the default %t which should have been changed already as it really gives you all sort of problems. See #1093 and and #1270

@rohanKanojia
Copy link
Member

@rhuss : Works, Thanks.

@rohanKanojia rohanKanojia merged commit db69e4a into fabric8io:master Jul 23, 2018
@rhuss rhuss added the target/3.5 PR targeted to 3.5 label Jul 30, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
target/3.5 PR targeted to 3.5
Projects
None yet
Development

Successfully merging this pull request may close these issues.

webapp generator requires <finalName> to be set
2 participants