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

@thomasmey thomasmey commented Mar 14, 2017

Issue #1549
Untested proposed fix.
Patch against 4.1.2

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

This comment has been minimized.

@axelfontaine

axelfontaine Mar 14, 2017
Contributor

Won't this be breaking older Tomcat releases?

This comment has been minimized.

@thomasmey

thomasmey Mar 14, 2017
Author Contributor

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...

This comment has been minimized.

@thomasmey

thomasmey Mar 31, 2017
Author Contributor

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?

This comment has been minimized.

@axelfontaine

axelfontaine Apr 3, 2017
Contributor

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

@axelfontaine axelfontaine commented Aug 17, 2017

@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
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.