Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve deployment of symlinked webapplications #6565

Closed
gregw opened this issue Aug 1, 2021 · 2 comments · Fixed by #6567
Closed

Improve deployment of symlinked webapplications #6565

gregw opened this issue Aug 1, 2021 · 2 comments · Fixed by #6567

Comments

@gregw
Copy link
Contributor

gregw commented Aug 1, 2021

Target Jetty version(s)
9, 10

Enhancement Description

After #6114 we can now deploy symlinked war files with the correct context path. eg.

   webapps
      + contextA.war -> /var/lib/myapp.war
      + contextB.war -> /var/lib/myapp.war

But the following does not work correctly:

   webapps
      + contextA -> /var/lib/myapp/
      + contextB -> /var/lib/myapp/
@gregw
Copy link
Contributor Author

gregw commented Aug 1, 2021

I think that at deployment time, either the deployer or the WebAppContext needs to resolve the base resource to its real path, but use the linked path for determining the context path (if none is set).
Removing any symlinks in the base Resource at deployment will simplify the considerations of #6540

@gregw gregw added this to To do in Jetty 9.4.44 FROZEN via automation Aug 1, 2021
@gregw gregw added this to To do in Jetty 10.0.7/11.0.7 FROZEN via automation Aug 1, 2021
@gregw
Copy link
Contributor Author

gregw commented Aug 1, 2021

It looks like this can be fixed by resolving to the real file either in the deployer or in the ContextHandler. This first corrects this issue only for deployed webapps, whilst the later will resolve for all usages.

gregw added a commit that referenced this issue Aug 2, 2021
Fix #6565 Deploy Symlinked applications by treating extracting context name (which becomes the default context path) from the base resource and then following aliases, so that base resource will not be an alias.   Added warning in ContextHandler if the base resource is an alias that we may not support this in future releases.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
@gregw gregw removed this from To do in Jetty 9.4.44 FROZEN Aug 2, 2021
gregw added a commit that referenced this issue Aug 2, 2021
Keep resource and file the same.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
Jetty 10.0.7/11.0.7 FROZEN automation moved this from To do to Done Aug 2, 2021
gregw added a commit that referenced this issue Aug 2, 2021
Fix #6565 Deploy Symlinked applications by treating extracting context name (which becomes the default context path) from the base resource and then following aliases, so that base resource will not be an alias.   Added warning in ContextHandler if the base resource is an alias that we may not support this in future releases.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

1 participant