-
Notifications
You must be signed in to change notification settings - Fork 14
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
Support for multiple war files #402
Support for multiple war files #402
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested this but had issues with detection.
My test had a directory with two WAR files in it. I did a pack build -p ./dir-with-warfiles
and had issues with detection. The Tomcat buildpack output:
PASSED: a WEB-INF directory was not found, this is normal when building from source
So I think it is going down the path of doing a build from source code, but this isn't a source code build.
What are the test cases that you tried? Were you building from source? If you have a project that produces multiple WAR files and could share it, that would help with testing.
There are five scenarios that come up in my head that we need to make sure work here:
- Build from source, produces a single WAR
- Build from source, produces multiple WAR files
- Precompiled assets single WAR with path pointing to the WAR, this is presented to the buildpacks as an exploded WAR directory
- Precompiled assets path pointing to a directory with multiple WAR files in it, buildpacks see the same
- Precompiled assets path pointing to a directory with a single WAR file in it, buildpacks will see the WAR file not an exploded WAR.
Let me know if you have questions about those scenarios.
@dmikusa, thank you so much for providing above testing cases. I am working on a testing repository. I will let you know when it is done. |
|
@dmikusa, could you please review the code change and test the sample repo? |
Apologies. You're on my list of PRs to review, but it's been busy lately. I promise I'll get to this as soon as I can. |
Again, sorry for taking so long to review this. I did some testing:
The last two situations fail because detection criteria do not take this situation into consideration, so you'll see it output:
and then fail cause it can't put together a buildplan. If the buildpack gets a directory of WAR files (precompiled), then it needs to handle this as well. How would you like to proceed here? You can either push an update to this PR to address the last two cases, or I can merge what we have and I can follow up with a PR to make these last two cases work. I'm OK merging what you have, if you want to go that route, because the existing cases continue to work, and this is adding support for one of the new cases. Let me know what you'd prefer. Thanks |
@dmikusa, thanks a lot for reviewing this PR. I would like merging it first, since I do not know how to reproduce the last two cases. So, could you please give me some instructions to tackle these two cases? By the way, do you mind if I directly contact you in slack? |
👍
1. Pack will use the directory as the application contents, so inside the container buildpacks will see the contents of that folder as 1. Pack will use the directory as the application contents, so inside the container buildpacks will see the contents of that folder as
Not at all. Feel free to reach on in the Paketo slack. I'm usually around there. |
Summary
I am trying to solve the issue#134 so that multiple war files can be deployed.
Use Cases
/workspace
, use/workspace
as thewebapps/
and explode war files into folders with same war file's name without file extension.Checklist