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

Fix Tomcat URL handling fallout #1555

Merged
merged 2 commits into from Apr 3, 2017
Merged

Conversation

thomasmey
Copy link
Contributor

Issue #1549
Untested proposed fix.
Patch against 4.1.2

JarFileClassPathLocationScanner locationScanner = new JarFileClassPathLocationScanner();
JarFileClassPathLocationScanner locationScanner;
if ("war".equals(protocol)) {
locationScanner = new JarFileClassPathLocationScanner("*/");
Copy link
Contributor

Choose a reason for hiding this comment

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

Won't this be breaking older Tomcat releases?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think so, as older tomcat version will return URLs like jar:xxx!/ for war files, and new tomcats will return URLs like war:xxx*/. but somebody should test this...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi, I manually did test this patch against Tomcat 8.5.5 and 8.5.13 (old and new URL handling) with plain 4.1.2 and patched 4.1.2.
The patched 4.1.2 always works correctly in all four constellations.
Do you need anything else to merge this PR?

Copy link
Contributor

Choose a reason for hiding this comment

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

OK, works for me. Thanks for verifying!

@axelfontaine axelfontaine merged commit b30ee80 into flyway:master Apr 3, 2017
@axelfontaine axelfontaine added this to the Flyway 4.2.0 milestone Apr 3, 2017
@axelfontaine
Copy link
Contributor

@thomasmey Could you please get in touch with me by email? (axel at boxfuse.com) Thanks!

dohrayme pushed a commit to dohrayme/flyway that referenced this pull request Feb 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants